import { Message, proto3, type BinaryReadOptions, type FieldList, type JsonReadOptions, type JsonValue, type PartialMessage, type PlainMessage } from '@bufbuild/protobuf'; import { EventToken, Field, QueryResult, Row, Target, VTGateCallerID } from './query_pb.js'; import { KeyRange, TabletType } from './topodata_pb.js'; import { CallerID } from './vtrpc_pb.js'; /** * OnDDLAction lists the possible actions for DDLs. * * @generated from enum binlogdata.OnDDLAction */ export declare enum OnDDLAction { /** * @generated from enum value: IGNORE = 0; */ IGNORE = 0, /** * @generated from enum value: STOP = 1; */ STOP = 1, /** * @generated from enum value: EXEC = 2; */ EXEC = 2, /** * @generated from enum value: EXEC_IGNORE = 3; */ EXEC_IGNORE = 3 } /** * VReplicationWorkflowType define types of vreplication workflows. * * @generated from enum binlogdata.VReplicationWorkflowType */ export declare enum VReplicationWorkflowType { /** * @generated from enum value: Materialize = 0; */ Materialize = 0, /** * @generated from enum value: MoveTables = 1; */ MoveTables = 1, /** * @generated from enum value: CreateLookupIndex = 2; */ CreateLookupIndex = 2, /** * @generated from enum value: Migrate = 3; */ Migrate = 3, /** * @generated from enum value: Reshard = 4; */ Reshard = 4, /** * @generated from enum value: OnlineDDL = 5; */ OnlineDDL = 5 } /** * VReplicationWorkflowSubType define types of vreplication workflows. * * @generated from enum binlogdata.VReplicationWorkflowSubType */ export declare enum VReplicationWorkflowSubType { /** * @generated from enum value: None = 0; */ None = 0, /** * @generated from enum value: Partial = 1; */ Partial = 1, /** * @generated from enum value: AtomicCopy = 2; */ AtomicCopy = 2 } /** * VReplicationWorklfowState defines the valid states that a workflow can be in. * * @generated from enum binlogdata.VReplicationWorkflowState */ export declare enum VReplicationWorkflowState { /** * @generated from enum value: Unknown = 0; */ Unknown = 0, /** * @generated from enum value: Init = 1; */ Init = 1, /** * @generated from enum value: Stopped = 2; */ Stopped = 2, /** * @generated from enum value: Copying = 3; */ Copying = 3, /** * @generated from enum value: Running = 4; */ Running = 4, /** * @generated from enum value: Error = 5; */ Error = 5, /** * @generated from enum value: Lagging = 6; */ Lagging = 6 } /** * VEventType enumerates the event types. Many of these types * will not be encountered in RBR mode. * * @generated from enum binlogdata.VEventType */ export declare enum VEventType { /** * @generated from enum value: UNKNOWN = 0; */ UNKNOWN = 0, /** * @generated from enum value: GTID = 1; */ GTID = 1, /** * @generated from enum value: BEGIN = 2; */ BEGIN = 2, /** * @generated from enum value: COMMIT = 3; */ COMMIT = 3, /** * @generated from enum value: ROLLBACK = 4; */ ROLLBACK = 4, /** * @generated from enum value: DDL = 5; */ DDL = 5, /** * INSERT, REPLACE, UPDATE, DELETE and SET will not be seen in RBR mode. * * @generated from enum value: INSERT = 6; */ INSERT = 6, /** * @generated from enum value: REPLACE = 7; */ REPLACE = 7, /** * @generated from enum value: UPDATE = 8; */ UPDATE = 8, /** * @generated from enum value: DELETE = 9; */ DELETE = 9, /** * @generated from enum value: SET = 10; */ SET = 10, /** * OTHER is a dummy event. If encountered, the current GTID must be * recorded by the client to be able to resume. * * @generated from enum value: OTHER = 11; */ OTHER = 11, /** * @generated from enum value: ROW = 12; */ ROW = 12, /** * @generated from enum value: FIELD = 13; */ FIELD = 13, /** * HEARTBEAT is sent if there is inactivity. If a client does not * receive events beyond the hearbeat interval, it can assume that it's * lost connection to the vstreamer. * * @generated from enum value: HEARTBEAT = 14; */ HEARTBEAT = 14, /** * VGTID is generated by VTGate's VStream that combines multiple * GTIDs. * * @generated from enum value: VGTID = 15; */ VGTID = 15, /** * @generated from enum value: JOURNAL = 16; */ JOURNAL = 16, /** * @generated from enum value: VERSION = 17; */ VERSION = 17, /** * @generated from enum value: LASTPK = 18; */ LASTPK = 18, /** * @generated from enum value: SAVEPOINT = 19; */ SAVEPOINT = 19, /** * COPY_COMPLETED is sent when VTGate's VStream copy operation is done. * If a client experiences some disruptions before receiving the event, * the client should restart the copy operation. * * @generated from enum value: COPY_COMPLETED = 20; */ COPY_COMPLETED = 20 } /** * MigrationType specifies the type of migration for the Journal. * * @generated from enum binlogdata.MigrationType */ export declare enum MigrationType { /** * @generated from enum value: TABLES = 0; */ TABLES = 0, /** * @generated from enum value: SHARDS = 1; */ SHARDS = 1 } /** * Charset is the per-statement charset info from a QUERY_EVENT binlog entry. * * @generated from message binlogdata.Charset */ export declare class Charset extends Message { /** * @@session.character_set_client * * @generated from field: int32 client = 1; */ client: number; /** * @@session.collation_connection * * @generated from field: int32 conn = 2; */ conn: number; /** * @@session.collation_server * * @generated from field: int32 server = 3; */ server: number; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.Charset"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): Charset; static fromJson(jsonValue: JsonValue, options?: Partial): Charset; static fromJsonString(jsonString: string, options?: Partial): Charset; static equals(a: Charset | PlainMessage | undefined, b: Charset | PlainMessage | undefined): boolean; } /** * BinlogTransaction describes a transaction inside the binlogs. * It is streamed by vttablet for filtered replication, used during resharding. * * @generated from message binlogdata.BinlogTransaction */ export declare class BinlogTransaction extends Message { /** * the statements in this transaction * * @generated from field: repeated binlogdata.BinlogTransaction.Statement statements = 1; */ statements: BinlogTransaction_Statement[]; /** * The Event Token for this event. * * @generated from field: query.EventToken event_token = 4; */ eventToken?: EventToken; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.BinlogTransaction"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): BinlogTransaction; static fromJson(jsonValue: JsonValue, options?: Partial): BinlogTransaction; static fromJsonString(jsonString: string, options?: Partial): BinlogTransaction; static equals(a: BinlogTransaction | PlainMessage | undefined, b: BinlogTransaction | PlainMessage | undefined): boolean; } /** * @generated from message binlogdata.BinlogTransaction.Statement */ export declare class BinlogTransaction_Statement extends Message { /** * what type of statement is this? * * @generated from field: binlogdata.BinlogTransaction.Statement.Category category = 1; */ category: BinlogTransaction_Statement_Category; /** * charset of this statement, if different from pre-negotiated default. * * @generated from field: binlogdata.Charset charset = 2; */ charset?: Charset; /** * the sql * * @generated from field: bytes sql = 3; */ sql: Uint8Array; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.BinlogTransaction.Statement"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): BinlogTransaction_Statement; static fromJson(jsonValue: JsonValue, options?: Partial): BinlogTransaction_Statement; static fromJsonString(jsonString: string, options?: Partial): BinlogTransaction_Statement; static equals(a: BinlogTransaction_Statement | PlainMessage | undefined, b: BinlogTransaction_Statement | PlainMessage | undefined): boolean; } /** * @generated from enum binlogdata.BinlogTransaction.Statement.Category */ export declare enum BinlogTransaction_Statement_Category { /** * @generated from enum value: BL_UNRECOGNIZED = 0; */ BL_UNRECOGNIZED = 0, /** * @generated from enum value: BL_BEGIN = 1; */ BL_BEGIN = 1, /** * @generated from enum value: BL_COMMIT = 2; */ BL_COMMIT = 2, /** * @generated from enum value: BL_ROLLBACK = 3; */ BL_ROLLBACK = 3, /** * BL_DML is deprecated. * * @generated from enum value: BL_DML_DEPRECATED = 4; */ BL_DML_DEPRECATED = 4, /** * @generated from enum value: BL_DDL = 5; */ BL_DDL = 5, /** * @generated from enum value: BL_SET = 6; */ BL_SET = 6, /** * @generated from enum value: BL_INSERT = 7; */ BL_INSERT = 7, /** * @generated from enum value: BL_UPDATE = 8; */ BL_UPDATE = 8, /** * @generated from enum value: BL_DELETE = 9; */ BL_DELETE = 9 } /** * StreamKeyRangeRequest is the payload to StreamKeyRange * * @generated from message binlogdata.StreamKeyRangeRequest */ export declare class StreamKeyRangeRequest extends Message { /** * where to start * * @generated from field: string position = 1; */ position: string; /** * what to get * * @generated from field: topodata.KeyRange key_range = 2; */ keyRange?: KeyRange; /** * default charset on the player side * * @generated from field: binlogdata.Charset charset = 3; */ charset?: Charset; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.StreamKeyRangeRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): StreamKeyRangeRequest; static fromJson(jsonValue: JsonValue, options?: Partial): StreamKeyRangeRequest; static fromJsonString(jsonString: string, options?: Partial): StreamKeyRangeRequest; static equals(a: StreamKeyRangeRequest | PlainMessage | undefined, b: StreamKeyRangeRequest | PlainMessage | undefined): boolean; } /** * StreamKeyRangeResponse is the response from StreamKeyRange * * @generated from message binlogdata.StreamKeyRangeResponse */ export declare class StreamKeyRangeResponse extends Message { /** * @generated from field: binlogdata.BinlogTransaction binlog_transaction = 1; */ binlogTransaction?: BinlogTransaction; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.StreamKeyRangeResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): StreamKeyRangeResponse; static fromJson(jsonValue: JsonValue, options?: Partial): StreamKeyRangeResponse; static fromJsonString(jsonString: string, options?: Partial): StreamKeyRangeResponse; static equals(a: StreamKeyRangeResponse | PlainMessage | undefined, b: StreamKeyRangeResponse | PlainMessage | undefined): boolean; } /** * StreamTablesRequest is the payload to StreamTables * * @generated from message binlogdata.StreamTablesRequest */ export declare class StreamTablesRequest extends Message { /** * where to start * * @generated from field: string position = 1; */ position: string; /** * what to get * * @generated from field: repeated string tables = 2; */ tables: string[]; /** * default charset on the player side * * @generated from field: binlogdata.Charset charset = 3; */ charset?: Charset; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.StreamTablesRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): StreamTablesRequest; static fromJson(jsonValue: JsonValue, options?: Partial): StreamTablesRequest; static fromJsonString(jsonString: string, options?: Partial): StreamTablesRequest; static equals(a: StreamTablesRequest | PlainMessage | undefined, b: StreamTablesRequest | PlainMessage | undefined): boolean; } /** * StreamTablesResponse is the response from StreamTables * * @generated from message binlogdata.StreamTablesResponse */ export declare class StreamTablesResponse extends Message { /** * @generated from field: binlogdata.BinlogTransaction binlog_transaction = 1; */ binlogTransaction?: BinlogTransaction; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.StreamTablesResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): StreamTablesResponse; static fromJson(jsonValue: JsonValue, options?: Partial): StreamTablesResponse; static fromJsonString(jsonString: string, options?: Partial): StreamTablesResponse; static equals(a: StreamTablesResponse | PlainMessage | undefined, b: StreamTablesResponse | PlainMessage | undefined): boolean; } /** * CharsetConversion represent a conversion of text from one charset to another * * @generated from message binlogdata.CharsetConversion */ export declare class CharsetConversion extends Message { /** * FromCharset is the charset name from which we convert the text (e.g. latin1) * * @generated from field: string from_charset = 1; */ fromCharset: string; /** * ToCharset is the charset name to which we convert the text (e.g. utf8mb4) * * @generated from field: string to_charset = 2; */ toCharset: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.CharsetConversion"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): CharsetConversion; static fromJson(jsonValue: JsonValue, options?: Partial): CharsetConversion; static fromJsonString(jsonString: string, options?: Partial): CharsetConversion; static equals(a: CharsetConversion | PlainMessage | undefined, b: CharsetConversion | PlainMessage | undefined): boolean; } /** * Rule represents one rule in a Filter. * * @generated from message binlogdata.Rule */ export declare class Rule extends Message { /** * Match can be a table name or a regular expression. * If it starts with a '/', it's a regular expression. * For example, "t" matches a table named "t", whereas * "/t.*" matches all tables that begin with 't'. * * @generated from field: string match = 1; */ match: string; /** * Filter: If empty, all columns and rows of the matching tables * are sent. If it's a keyrange like "-80", only rows that * match the keyrange are sent. * If Match is a table name instead of a regular expression, * the Filter can also be a select expression like this: * "select * from t", same as an empty Filter, or * "select * from t where in_keyrange('-80')", same as "-80", or * "select col1, col2 from t where in_keyrange(col1, 'hash', '-80'), or * What is allowed in a select expression depends on whether * it's a vstreamer or vreplication request. For more details, * please refer to the specific package documentation. * On the vreplication side, Filter can also accept a special * "exclude" value, which will cause the matched tables * to be excluded. * TODO(sougou): support this on vstreamer side also. * * ConvertEnumToText: optional, list per enum column name, the list of textual values. * When reading the binary log, all enum values are numeric. But sometimes it * is useful/needed to know what the textual mapping are. * Online DDL provides such use case. * * @generated from field: string filter = 2; */ filter: string; /** * Example: key="color", value="'red','green','blue'" * * @generated from field: map convert_enum_to_text = 3; */ convertEnumToText: { [key: string]: string; }; /** * ConvertCharset: optional mapping, between column name and a CharsetConversion. * This hints to vreplication that columns are encoded from/to non-trivial charsets * The map is only populated when either "from" or "to" charset of a column are non-trivial * trivial charsets are utf8 and ascii variants. * * @generated from field: map convert_charset = 4; */ convertCharset: { [key: string]: CharsetConversion; }; /** * SourceUniqueKeyColumns represents the ordered columns in the index used by rowstreamer to iterate the table * It is comma delimited, as in col1,col2,col3 (tokens are escaped via net/url) * * @generated from field: string source_unique_key_columns = 5; */ sourceUniqueKeyColumns: string; /** * TargetUniqueKeyColumns represents the ordered columns in that index used by vcopier and vplayer to apply rows * It is comma delimited, as in col1,col2,col3 (tokens are escaped via net/url) * * @generated from field: string target_unique_key_columns = 6; */ targetUniqueKeyColumns: string; /** * SourceUniqueKeyTargetColumns represents the names of columns in target table, mapped from the chosen unique * key on source tables (some columns may be renamed from source to target) * * @generated from field: string source_unique_key_target_columns = 7; */ sourceUniqueKeyTargetColumns: string; /** * ConvertIntToEnum lists any columns that are converted from an integral value into an enum. * such columns need to have special transofrmation of the data, from an integral format into a * string format. e.g. the value 0 needs to be converted to '0'. * * @generated from field: map convert_int_to_enum = 8; */ convertIntToEnum: { [key: string]: boolean; }; /** * ForceUniqueKey gives vtreamer a hint for `FORCE INDEX (...)` usage. * * @generated from field: string force_unique_key = 9; */ forceUniqueKey: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.Rule"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): Rule; static fromJson(jsonValue: JsonValue, options?: Partial): Rule; static fromJsonString(jsonString: string, options?: Partial): Rule; static equals(a: Rule | PlainMessage | undefined, b: Rule | PlainMessage | undefined): boolean; } /** * Filter represents a list of ordered rules. The first * match wins. * * @generated from message binlogdata.Filter */ export declare class Filter extends Message { /** * @generated from field: repeated binlogdata.Rule rules = 1; */ rules: Rule[]; /** * FieldEventMode specifies the behavior if there is a mismatch * between the current schema and the fields in the binlog. This * can happen if the binlog position is before a DDL that would * cause the fields to change. If vstreamer detects such * an inconsistency, the behavior depends on the FieldEventMode. * If the value is ERR_ON_MISMATCH (default), then it errors out. * If it's BEST_EFFORT, it sends a field event with fake column * names as "@1", "@2", etc. * * @generated from field: binlogdata.Filter.FieldEventMode field_event_mode = 2; */ fieldEventMode: Filter_FieldEventMode; /** * @generated from field: int64 workflow_type = 3; */ workflowType: bigint; /** * @generated from field: string workflow_name = 4; */ workflowName: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.Filter"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): Filter; static fromJson(jsonValue: JsonValue, options?: Partial): Filter; static fromJsonString(jsonString: string, options?: Partial): Filter; static equals(a: Filter | PlainMessage | undefined, b: Filter | PlainMessage | undefined): boolean; } /** * @generated from enum binlogdata.Filter.FieldEventMode */ export declare enum Filter_FieldEventMode { /** * @generated from enum value: ERR_ON_MISMATCH = 0; */ ERR_ON_MISMATCH = 0, /** * @generated from enum value: BEST_EFFORT = 1; */ BEST_EFFORT = 1 } /** * BinlogSource specifies the source and filter parameters for * Filtered Replication. KeyRange and Tables are legacy. Filter * is the new way to specify the filtering rules. * * @generated from message binlogdata.BinlogSource */ export declare class BinlogSource extends Message { /** * the source keyspace * * @generated from field: string keyspace = 1; */ keyspace: string; /** * the source shard * * @generated from field: string shard = 2; */ shard: string; /** * the source tablet type * * @generated from field: topodata.TabletType tablet_type = 3; */ tabletType: TabletType; /** * KeyRange is set if the request is for a keyrange * * @generated from field: topodata.KeyRange key_range = 4; */ keyRange?: KeyRange; /** * Tables is set if the request is for a list of tables * * @generated from field: repeated string tables = 5; */ tables: string[]; /** * Filter is set if we're using the generalized representation * for the filter. * * @generated from field: binlogdata.Filter filter = 6; */ filter?: Filter; /** * OnDdl specifies the action to be taken when a DDL is encountered. * * @generated from field: binlogdata.OnDDLAction on_ddl = 7; */ onDdl: OnDDLAction; /** * Source is an external mysql. This attribute should be set to the username * to use in the connection * * @generated from field: string external_mysql = 8; */ externalMysql: string; /** * StopAfterCopy specifies if vreplication should be stopped * after copying is done. * * @generated from field: bool stop_after_copy = 9; */ stopAfterCopy: boolean; /** * ExternalCluster is the name of the mounted cluster which has the source keyspace/db for this workflow * it is of the type * * @generated from field: string external_cluster = 10; */ externalCluster: string; /** * SourceTimeZone is the time zone in which datetimes on the source were stored, provided as an option in MoveTables * * @generated from field: string source_time_zone = 11; */ sourceTimeZone: string; /** * TargetTimeZone is not currently specifiable by the user, defaults to UTC for the forward workflows * and to the SourceTimeZone in reverse workflows * * @generated from field: string target_time_zone = 12; */ targetTimeZone: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.BinlogSource"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): BinlogSource; static fromJson(jsonValue: JsonValue, options?: Partial): BinlogSource; static fromJsonString(jsonString: string, options?: Partial): BinlogSource; static equals(a: BinlogSource | PlainMessage | undefined, b: BinlogSource | PlainMessage | undefined): boolean; } /** * RowChange represents one row change. * If Before is set and not After, it's a delete. * If After is set and not Before, it's an insert. * If both are set, it's an update. * * @generated from message binlogdata.RowChange */ export declare class RowChange extends Message { /** * @generated from field: query.Row before = 1; */ before?: Row; /** * @generated from field: query.Row after = 2; */ after?: Row; /** * DataColumns is a bitmap of all columns: bit is set if column is present in the after image * * @generated from field: binlogdata.RowChange.Bitmap data_columns = 3; */ dataColumns?: RowChange_Bitmap; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.RowChange"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): RowChange; static fromJson(jsonValue: JsonValue, options?: Partial): RowChange; static fromJsonString(jsonString: string, options?: Partial): RowChange; static equals(a: RowChange | PlainMessage | undefined, b: RowChange | PlainMessage | undefined): boolean; } /** * @generated from message binlogdata.RowChange.Bitmap */ export declare class RowChange_Bitmap extends Message { /** * @generated from field: int64 count = 1; */ count: bigint; /** * @generated from field: bytes cols = 2; */ cols: Uint8Array; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.RowChange.Bitmap"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): RowChange_Bitmap; static fromJson(jsonValue: JsonValue, options?: Partial): RowChange_Bitmap; static fromJsonString(jsonString: string, options?: Partial): RowChange_Bitmap; static equals(a: RowChange_Bitmap | PlainMessage | undefined, b: RowChange_Bitmap | PlainMessage | undefined): boolean; } /** * RowEvent represent row events for one table. * * @generated from message binlogdata.RowEvent */ export declare class RowEvent extends Message { /** * @generated from field: string table_name = 1; */ tableName: string; /** * @generated from field: repeated binlogdata.RowChange row_changes = 2; */ rowChanges: RowChange[]; /** * @generated from field: string keyspace = 3; */ keyspace: string; /** * @generated from field: string shard = 4; */ shard: string; /** * https://dev.mysql.com/doc/dev/mysql-server/latest/classbinary__log_1_1Rows__event.html * * @generated from field: uint32 flags = 5; */ flags: number; /** * set for sidecardb tables * * @generated from field: bool is_internal_table = 6; */ isInternalTable: boolean; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.RowEvent"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): RowEvent; static fromJson(jsonValue: JsonValue, options?: Partial): RowEvent; static fromJsonString(jsonString: string, options?: Partial): RowEvent; static equals(a: RowEvent | PlainMessage | undefined, b: RowEvent | PlainMessage | undefined): boolean; } /** * FieldEvent represents the field info for a table. * * @generated from message binlogdata.FieldEvent */ export declare class FieldEvent extends Message { /** * @generated from field: string table_name = 1; */ tableName: string; /** * @generated from field: repeated query.Field fields = 2; */ fields: Field[]; /** * @generated from field: string keyspace = 3; */ keyspace: string; /** * @generated from field: string shard = 4; */ shard: string; /** * Are ENUM and SET field values already mapped to strings in the ROW * events? This allows us to transition VTGate VStream consumers from * the pre v20 behavior of having to do this mapping themselves to the * v20+ behavior of not having to do this anymore and to expect string * values directly. * NOTE: because this is the use case, this is ONLY ever set today in * vstreams managed by the vstreamManager. * * @generated from field: bool enum_set_string_values = 25; */ enumSetStringValues: boolean; /** * set for sidecardb tables * * @generated from field: bool is_internal_table = 26; */ isInternalTable: boolean; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.FieldEvent"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): FieldEvent; static fromJson(jsonValue: JsonValue, options?: Partial): FieldEvent; static fromJsonString(jsonString: string, options?: Partial): FieldEvent; static equals(a: FieldEvent | PlainMessage | undefined, b: FieldEvent | PlainMessage | undefined): boolean; } /** * ShardGtid contains the GTID position for one shard. * It's used in a request for requesting a starting position. * It's used in a response to transmit the current position * of a shard. It's also used in a Journal to indicate the * list of targets and shard positions to migrate to. * * @generated from message binlogdata.ShardGtid */ export declare class ShardGtid extends Message { /** * @generated from field: string keyspace = 1; */ keyspace: string; /** * @generated from field: string shard = 2; */ shard: string; /** * @generated from field: string gtid = 3; */ gtid: string; /** * @generated from field: repeated binlogdata.TableLastPK table_p_ks = 4; */ tablePKs: TableLastPK[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.ShardGtid"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): ShardGtid; static fromJson(jsonValue: JsonValue, options?: Partial): ShardGtid; static fromJsonString(jsonString: string, options?: Partial): ShardGtid; static equals(a: ShardGtid | PlainMessage | undefined, b: ShardGtid | PlainMessage | undefined): boolean; } /** * A VGtid is a list of ShardGtids. * * @generated from message binlogdata.VGtid */ export declare class VGtid extends Message { /** * @generated from field: repeated binlogdata.ShardGtid shard_gtids = 1; */ shardGtids: ShardGtid[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VGtid"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VGtid; static fromJson(jsonValue: JsonValue, options?: Partial): VGtid; static fromJsonString(jsonString: string, options?: Partial): VGtid; static equals(a: VGtid | PlainMessage | undefined, b: VGtid | PlainMessage | undefined): boolean; } /** * KeyspaceShard represents a keyspace and shard. * * @generated from message binlogdata.KeyspaceShard */ export declare class KeyspaceShard extends Message { /** * @generated from field: string keyspace = 1; */ keyspace: string; /** * @generated from field: string shard = 2; */ shard: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.KeyspaceShard"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): KeyspaceShard; static fromJson(jsonValue: JsonValue, options?: Partial): KeyspaceShard; static fromJsonString(jsonString: string, options?: Partial): KeyspaceShard; static equals(a: KeyspaceShard | PlainMessage | undefined, b: KeyspaceShard | PlainMessage | undefined): boolean; } /** * Journal contains the metadata for a journal event. * The commit of a journal event indicates the point of no return * for a migration. * * @generated from message binlogdata.Journal */ export declare class Journal extends Message { /** * Id represents a unique journal id. * * @generated from field: int64 id = 1; */ id: bigint; /** * @generated from field: binlogdata.MigrationType migration_type = 2; */ migrationType: MigrationType; /** * Tables is set if the journal represents a TABLES migration. * * @generated from field: repeated string tables = 3; */ tables: string[]; /** * LocalPosition is the source position at which the migration happened. * * @generated from field: string local_position = 4; */ localPosition: string; /** * ShardGtids is the list of targets to which the migration took place. * * @generated from field: repeated binlogdata.ShardGtid shard_gtids = 5; */ shardGtids: ShardGtid[]; /** * Participants is the list of source participants for a migration. * Every participant is expected to have an identical journal entry. * While streaming, the client must wait for the journal entry to * be received from all pariticipants, and then replace them with new * streams specified by ShardGtid. * If a stream does not have all participants, a consistent migration * is not possible. * * @generated from field: repeated binlogdata.KeyspaceShard participants = 6; */ participants: KeyspaceShard[]; /** * SourceWorkflows is the list of workflows in the source shard that * were migrated to the target. If a migration fails after a Journal * is committed, this information is used to start the target streams * that were created prior to the creation of the journal. * * @generated from field: repeated string source_workflows = 7; */ sourceWorkflows: string[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.Journal"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): Journal; static fromJson(jsonValue: JsonValue, options?: Partial): Journal; static fromJsonString(jsonString: string, options?: Partial): Journal; static equals(a: Journal | PlainMessage | undefined, b: Journal | PlainMessage | undefined): boolean; } /** * VEvent represents a vstream event. * A FieldEvent is sent once for every table, just before * the first event for that table. The client is expected * to cache this information and match it against the RowEvent * which contains the table name. * A GTID event always precedes a commitable event, which can be * COMMIT, DDL or OTHER. * OTHER events are non-material events that have no additional metadata. * * @generated from message binlogdata.VEvent */ export declare class VEvent extends Message { /** * @generated from field: binlogdata.VEventType type = 1; */ type: VEventType; /** * Timestamp is the binlog timestamp in seconds. * The value should be ignored if 0. * * @generated from field: int64 timestamp = 2; */ timestamp: bigint; /** * Gtid is set if the event type is GTID. * * @generated from field: string gtid = 3; */ gtid: string; /** * Statement is set if the event type is DDL, DML or SAVEPOINT. * * @generated from field: string statement = 4; */ statement: string; /** * RowEvent is set if the event type is ROW. * * @generated from field: binlogdata.RowEvent row_event = 5; */ rowEvent?: RowEvent; /** * FieldEvent is set if the event type is FIELD. * * @generated from field: binlogdata.FieldEvent field_event = 6; */ fieldEvent?: FieldEvent; /** * Vgtid is set if the event type is VGTID. * This event is only generated by VTGate's VStream function. * * @generated from field: binlogdata.VGtid vgtid = 7; */ vgtid?: VGtid; /** * Journal is set if the event type is JOURNAL. * * @generated from field: binlogdata.Journal journal = 8; */ journal?: Journal; /** * Dml is set if the event type is INSERT, REPLACE, UPDATE or DELETE. * * @generated from field: string dml = 9; */ dml: string; /** * CurrentTime specifies the current time when the message was sent. * This can be used to compenssate for clock skew. * * @generated from field: int64 current_time = 20; */ currentTime: bigint; /** * LastPK is the last PK for a table * * @generated from field: binlogdata.LastPKEvent last_p_k_event = 21; */ lastPKEvent?: LastPKEvent; /** * the source keyspace * * @generated from field: string keyspace = 22; */ keyspace: string; /** * the source shard * * @generated from field: string shard = 23; */ shard: string; /** * indicate that we are being throttled right now * * @generated from field: bool throttled = 24; */ throttled: boolean; /** * ThrottledReason is a human readable string that explains why the stream is throttled * * @generated from field: string throttled_reason = 25; */ throttledReason: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VEvent"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VEvent; static fromJson(jsonValue: JsonValue, options?: Partial): VEvent; static fromJsonString(jsonString: string, options?: Partial): VEvent; static equals(a: VEvent | PlainMessage | undefined, b: VEvent | PlainMessage | undefined): boolean; } /** * @generated from message binlogdata.MinimalTable */ export declare class MinimalTable extends Message { /** * @generated from field: string name = 1; */ name: string; /** * @generated from field: repeated query.Field fields = 2; */ fields: Field[]; /** * @generated from field: repeated int64 p_k_columns = 3; */ pKColumns: bigint[]; /** * This will be PRIMARY when the actual primary key is used and it * will be the name of the Primary Key equivalent if one is used * instead. Otherwise it will be empty. * * @generated from field: string p_k_index_name = 4; */ pKIndexName: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.MinimalTable"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): MinimalTable; static fromJson(jsonValue: JsonValue, options?: Partial): MinimalTable; static fromJsonString(jsonString: string, options?: Partial): MinimalTable; static equals(a: MinimalTable | PlainMessage | undefined, b: MinimalTable | PlainMessage | undefined): boolean; } /** * @generated from message binlogdata.MinimalSchema */ export declare class MinimalSchema extends Message { /** * @generated from field: repeated binlogdata.MinimalTable tables = 1; */ tables: MinimalTable[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.MinimalSchema"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): MinimalSchema; static fromJson(jsonValue: JsonValue, options?: Partial): MinimalSchema; static fromJsonString(jsonString: string, options?: Partial): MinimalSchema; static equals(a: MinimalSchema | PlainMessage | undefined, b: MinimalSchema | PlainMessage | undefined): boolean; } /** * @generated from message binlogdata.VStreamOptions */ export declare class VStreamOptions extends Message { /** * @generated from field: repeated string internal_tables = 1; */ internalTables: string[]; /** * @generated from field: map config_overrides = 2; */ configOverrides: { [key: string]: string; }; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamOptions"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamOptions; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamOptions; static fromJsonString(jsonString: string, options?: Partial): VStreamOptions; static equals(a: VStreamOptions | PlainMessage | undefined, b: VStreamOptions | PlainMessage | undefined): boolean; } /** * VStreamRequest is the payload for VStreamer * * @generated from message binlogdata.VStreamRequest */ export declare class VStreamRequest extends Message { /** * @generated from field: vtrpc.CallerID effective_caller_id = 1; */ effectiveCallerId?: CallerID; /** * @generated from field: query.VTGateCallerID immediate_caller_id = 2; */ immediateCallerId?: VTGateCallerID; /** * @generated from field: query.Target target = 3; */ target?: Target; /** * @generated from field: string position = 4; */ position: string; /** * @generated from field: binlogdata.Filter filter = 5; */ filter?: Filter; /** * @generated from field: repeated binlogdata.TableLastPK table_last_p_ks = 6; */ tableLastPKs: TableLastPK[]; /** * @generated from field: binlogdata.VStreamOptions options = 7; */ options?: VStreamOptions; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamRequest; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamRequest; static fromJsonString(jsonString: string, options?: Partial): VStreamRequest; static equals(a: VStreamRequest | PlainMessage | undefined, b: VStreamRequest | PlainMessage | undefined): boolean; } /** * VStreamResponse is the response from VStreamer * * @generated from message binlogdata.VStreamResponse */ export declare class VStreamResponse extends Message { /** * @generated from field: repeated binlogdata.VEvent events = 1; */ events: VEvent[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamResponse; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamResponse; static fromJsonString(jsonString: string, options?: Partial): VStreamResponse; static equals(a: VStreamResponse | PlainMessage | undefined, b: VStreamResponse | PlainMessage | undefined): boolean; } /** * VStreamRowsRequest is the payload for VStreamRows * * @generated from message binlogdata.VStreamRowsRequest */ export declare class VStreamRowsRequest extends Message { /** * @generated from field: vtrpc.CallerID effective_caller_id = 1; */ effectiveCallerId?: CallerID; /** * @generated from field: query.VTGateCallerID immediate_caller_id = 2; */ immediateCallerId?: VTGateCallerID; /** * @generated from field: query.Target target = 3; */ target?: Target; /** * @generated from field: string query = 4; */ query: string; /** * @generated from field: query.QueryResult lastpk = 5; */ lastpk?: QueryResult; /** * @generated from field: binlogdata.VStreamOptions options = 6; */ options?: VStreamOptions; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamRowsRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamRowsRequest; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamRowsRequest; static fromJsonString(jsonString: string, options?: Partial): VStreamRowsRequest; static equals(a: VStreamRowsRequest | PlainMessage | undefined, b: VStreamRowsRequest | PlainMessage | undefined): boolean; } /** * VStreamRowsResponse is the response from VStreamRows * * @generated from message binlogdata.VStreamRowsResponse */ export declare class VStreamRowsResponse extends Message { /** * @generated from field: repeated query.Field fields = 1; */ fields: Field[]; /** * @generated from field: repeated query.Field pkfields = 2; */ pkfields: Field[]; /** * @generated from field: string gtid = 3; */ gtid: string; /** * @generated from field: repeated query.Row rows = 4; */ rows: Row[]; /** * @generated from field: query.Row lastpk = 5; */ lastpk?: Row; /** * Throttled indicates that rowstreamer is being throttled right now * * @generated from field: bool throttled = 6; */ throttled: boolean; /** * Heartbeat indicates that this is a heartbeat message * * @generated from field: bool heartbeat = 7; */ heartbeat: boolean; /** * ThrottledReason is a human readable string that explains why the stream is throttled * * @generated from field: string throttled_reason = 8; */ throttledReason: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamRowsResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamRowsResponse; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamRowsResponse; static fromJsonString(jsonString: string, options?: Partial): VStreamRowsResponse; static equals(a: VStreamRowsResponse | PlainMessage | undefined, b: VStreamRowsResponse | PlainMessage | undefined): boolean; } /** * VStreamTablesRequest is the payload for VStreamTables * * @generated from message binlogdata.VStreamTablesRequest */ export declare class VStreamTablesRequest extends Message { /** * @generated from field: vtrpc.CallerID effective_caller_id = 1; */ effectiveCallerId?: CallerID; /** * @generated from field: query.VTGateCallerID immediate_caller_id = 2; */ immediateCallerId?: VTGateCallerID; /** * @generated from field: query.Target target = 3; */ target?: Target; /** * @generated from field: binlogdata.VStreamOptions options = 4; */ options?: VStreamOptions; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamTablesRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamTablesRequest; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamTablesRequest; static fromJsonString(jsonString: string, options?: Partial): VStreamTablesRequest; static equals(a: VStreamTablesRequest | PlainMessage | undefined, b: VStreamTablesRequest | PlainMessage | undefined): boolean; } /** * VStreamTablesResponse is the response from VStreamTables * * @generated from message binlogdata.VStreamTablesResponse */ export declare class VStreamTablesResponse extends Message { /** * @generated from field: string table_name = 1; */ tableName: string; /** * @generated from field: repeated query.Field fields = 2; */ fields: Field[]; /** * @generated from field: repeated query.Field pkfields = 3; */ pkfields: Field[]; /** * @generated from field: string gtid = 4; */ gtid: string; /** * @generated from field: repeated query.Row rows = 5; */ rows: Row[]; /** * @generated from field: query.Row lastpk = 6; */ lastpk?: Row; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamTablesResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamTablesResponse; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamTablesResponse; static fromJsonString(jsonString: string, options?: Partial): VStreamTablesResponse; static equals(a: VStreamTablesResponse | PlainMessage | undefined, b: VStreamTablesResponse | PlainMessage | undefined): boolean; } /** * @generated from message binlogdata.LastPKEvent */ export declare class LastPKEvent extends Message { /** * @generated from field: binlogdata.TableLastPK table_last_p_k = 1; */ tableLastPK?: TableLastPK; /** * @generated from field: bool completed = 2; */ completed: boolean; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.LastPKEvent"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): LastPKEvent; static fromJson(jsonValue: JsonValue, options?: Partial): LastPKEvent; static fromJsonString(jsonString: string, options?: Partial): LastPKEvent; static equals(a: LastPKEvent | PlainMessage | undefined, b: LastPKEvent | PlainMessage | undefined): boolean; } /** * @generated from message binlogdata.TableLastPK */ export declare class TableLastPK extends Message { /** * @generated from field: string table_name = 1; */ tableName: string; /** * @generated from field: query.QueryResult lastpk = 3; */ lastpk?: QueryResult; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.TableLastPK"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): TableLastPK; static fromJson(jsonValue: JsonValue, options?: Partial): TableLastPK; static fromJsonString(jsonString: string, options?: Partial): TableLastPK; static equals(a: TableLastPK | PlainMessage | undefined, b: TableLastPK | PlainMessage | undefined): boolean; } /** * VStreamResultsRequest is the payload for VStreamResults * The ids match VStreamRows, in case we decide to merge the two. * The ids match VStreamRows, in case we decide to merge the two. * * @generated from message binlogdata.VStreamResultsRequest */ export declare class VStreamResultsRequest extends Message { /** * @generated from field: vtrpc.CallerID effective_caller_id = 1; */ effectiveCallerId?: CallerID; /** * @generated from field: query.VTGateCallerID immediate_caller_id = 2; */ immediateCallerId?: VTGateCallerID; /** * @generated from field: query.Target target = 3; */ target?: Target; /** * @generated from field: string query = 4; */ query: string; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamResultsRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamResultsRequest; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamResultsRequest; static fromJsonString(jsonString: string, options?: Partial): VStreamResultsRequest; static equals(a: VStreamResultsRequest | PlainMessage | undefined, b: VStreamResultsRequest | PlainMessage | undefined): boolean; } /** * VStreamResultsResponse is the response from VStreamResults * The ids match VStreamRows, in case we decide to merge the two. * * @generated from message binlogdata.VStreamResultsResponse */ export declare class VStreamResultsResponse extends Message { /** * @generated from field: repeated query.Field fields = 1; */ fields: Field[]; /** * @generated from field: string gtid = 3; */ gtid: string; /** * @generated from field: repeated query.Row rows = 4; */ rows: Row[]; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "binlogdata.VStreamResultsResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): VStreamResultsResponse; static fromJson(jsonValue: JsonValue, options?: Partial): VStreamResultsResponse; static fromJsonString(jsonString: string, options?: Partial): VStreamResultsResponse; static equals(a: VStreamResultsResponse | PlainMessage | undefined, b: VStreamResultsResponse | PlainMessage | undefined): boolean; }