BeginRequest is the payload to Begin.
BeginResponse is the returned value from Begin.
BeginResponse is the returned value from Begin.
session is the initial session information to use for subsequent queries.
BoundKeyspaceIdQuery represents a single query request for the specified list of keyspace ids.
BoundKeyspaceIdQuery represents a single query request for the specified list of keyspace ids. This is used in a list for ExecuteBatchKeyspaceIdsRequest.
query is the query and bind variables to execute.
keyspace to target the query to.
keyspace_ids contains the list of keyspace_ids affected by this query. Will be used to find the shards to send the query to.
BoundShardQuery represents a single query request for the specified list of shards.
BoundShardQuery represents a single query request for the specified list of shards. This is used in a list for ExecuteBatchShardsRequest.
query is the query and bind variables to execute.
keyspace to target the query to.
shards to target the query to. A DML can only target one shard.
CommitRequest is the payload to Commit.
CommitRequest is the payload to Commit.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data to commit.
atomic specifies if the commit should go through the 2PC workflow to ensure atomicity.
CommitResponse is the returned value from Commit.
CommitResponse is the returned value from Commit.
ExecuteBatchKeyspaceIdsRequest is the payload to ExecuteBatchKeyspaceId.
ExecuteBatchKeyspaceIdsRequest is the payload to ExecuteBatchKeyspaceId.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
tablet_type is the type of tablets that this query is targeted to.
as_transaction will execute the queries in this batch in a single transaction per shard, created for this purpose. (this can be seen as adding a 'begin' before and 'commit' after the queries). Only makes sense if tablet_type is master. If set, the Session is ignored.
options
ExecuteBatchKeyspaceIdsResponse is the returned value from ExecuteBatchKeyspaceId.
ExecuteBatchKeyspaceIdsResponse is the returned value from ExecuteBatchKeyspaceId.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
result contains the query result, only set if error is unset.
ExecuteBatchRequest is the payload to ExecuteBatch.
ExecuteBatchRequest is the payload to ExecuteBatch.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
queries is a list of query and bind variables to execute.
tablet_type is the type of tablets that these queries is targeted to.
as_transaction will execute the queries in this batch in a single transaction per shard, created for this purpose. (this can be seen as adding a 'begin' before and 'commit' after the queries). Only makes sense if tablet_type is master. If set, the Session is ignored.
keyspace to target the queries to.
options
ExecuteBatchResponse is the returned value from ExecuteBatch.
ExecuteBatchResponse is the returned value from ExecuteBatch.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
results contains the query results, only set if application level error is unset.
ExecuteBatchShardsRequest is the payload to ExecuteBatchShards
ExecuteBatchShardsRequest is the payload to ExecuteBatchShards
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
queries carries all the queries to execute.
tablet_type is the type of tablets that this query is targeted to.
as_transaction will execute the queries in this batch in a single transaction per shard, created for this purpose. (this can be seen as adding a 'begin' before and 'commit' after the queries). Only makes sense if tablet_type is master. If set, the Session is ignored.
options
ExecuteBatchShardsResponse is the returned value from ExecuteBatchShards.
ExecuteBatchShardsResponse is the returned value from ExecuteBatchShards.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
result contains the query result, only set if error is unset.
ExecuteEntityIdsRequest is the payload to ExecuteEntityIds.
ExecuteEntityIdsRequest is the payload to ExecuteEntityIds.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
query is the query and bind variables to execute.
keyspace to target the query to.
entity_column_name is the column name to use.
entity_keyspace_ids are pairs of entity_column_name values associated with its corresponding keyspace_id.
tablet_type is the type of tablets that this query is targeted to.
not_in_transaction is deprecated and should not be used.
options
ExecuteEntityIdsResponse is the returned value from ExecuteEntityIds.
ExecuteEntityIdsResponse is the returned value from ExecuteEntityIds.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
result contains the query result, only set if error is unset.
ExecuteKeyRangesRequest is the payload to ExecuteKeyRanges.
ExecuteKeyRangesRequest is the payload to ExecuteKeyRanges.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
query is the query and bind variables to execute.
keyspace to target the query to
key_ranges contains the list of key ranges affected by this query. Will be used to find the shards to send the query to.
tablet_type is the type of tablets that this query is targeted to.
not_in_transaction is deprecated and should not be used.
options
ExecuteKeyRangesResponse is the returned value from ExecuteKeyRanges.
ExecuteKeyRangesResponse is the returned value from ExecuteKeyRanges.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
result contains the query result, only set if error is unset.
ExecuteKeyspaceIdsRequest is the payload to ExecuteKeyspaceIds.
ExecuteKeyspaceIdsRequest is the payload to ExecuteKeyspaceIds.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
query is the query and bind variables to execute.
keyspace to target the query to.
keyspace_ids contains the list of keyspace_ids affected by this query. Will be used to find the shards to send the query to.
tablet_type is the type of tablets that this query is targeted to.
not_in_transaction is deprecated and should not be used.
options
ExecuteKeyspaceIdsResponse is the returned value from ExecuteKeyspaceIds.
ExecuteKeyspaceIdsResponse is the returned value from ExecuteKeyspaceIds.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
result contains the query result, only set if error is unset.
ExecuteRequest is the payload to Execute.
ExecuteRequest is the payload to Execute.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
query is the query and bind variables to execute.
tablet_type is the type of tablets that this query is targeted to.
not_in_transaction is deprecated and should not be used.
keyspace to target the query to.
options
ExecuteResponse is the returned value from Execute.
ExecuteResponse is the returned value from Execute.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
result contains the query result, only set if error is unset.
ExecuteShardsRequest is the payload to ExecuteShards.
ExecuteShardsRequest is the payload to ExecuteShards.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data. It is returned by Begin. Do not fill it in if outside of a transaction.
query is the query and bind variables to execute.
keyspace to target the query to.
shards to target the query to. A DML can only target one shard.
tablet_type is the type of tablets that this query is targeted to.
not_in_transaction is deprecated and should not be used.
options
ExecuteShardsResponse is the returned value from ExecuteShards.
ExecuteShardsResponse is the returned value from ExecuteShards.
error contains an application level error if necessary. Note the session may have changed, even when an error is returned (for instance if a database integrity error happened).
session is the updated session information (only returned inside a transaction).
result contains the query result, only set if error is unset.
GetSrvKeyspaceRequest is the payload to GetSrvKeyspace.
GetSrvKeyspaceRequest is the payload to GetSrvKeyspace.
keyspace name to fetch.
GetSrvKeyspaceResponse is the returned value from GetSrvKeyspace.
GetSrvKeyspaceResponse is the returned value from GetSrvKeyspace.
srv_keyspace is the topology object for the SrvKeyspace.
MessageAckRequest is the request payload for MessageAck.
MessageAckRequest is the request payload for MessageAck.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
Optional keyspace for message table.
name is the message table name.
ids is the list of ids to ack.
MessageStreamRequest is the request payload for MessageStream.
MessageStreamRequest is the request payload for MessageStream.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
keyspace to target the query to.
shard to target the query to, for unsharded keyspaces.
KeyRange to target the query to, for sharded keyspaces.
name is the message table name.
ResolveTransactionRequest is the payload to ResolveTransaction.
ResolveTransactionRequest is the payload to ResolveTransaction.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
dtid is the dtid of the transaction to be resolved.
ResolveTransactionResponse is the returned value from Rollback.
ResolveTransactionResponse is the returned value from Rollback.
RollbackRequest is the payload to Rollback.
RollbackRequest is the payload to Rollback.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
session carries the current transaction data to rollback.
RollbackResponse is the returned value from Rollback.
RollbackResponse is the returned value from Rollback.
Session objects are session cookies and are invalidated on use.
Session objects are session cookies and are invalidated on use. Query results will contain updated session values. Their content should be opaque to the user.
single_db specifies if the transaction should be restricted to a single database.
SplitQueryRequest is the payload to SplitQuery.
SplitQueryRequest is the payload to SplitQuery.
SplitQuery takes a "SELECT" query and generates a list of queries called "query-parts". Each query-part consists of the original query with an added WHERE clause that restricts the query-part to operate only on rows whose values in the the columns listed in the "split_column" field of the request (see below) are in a particular range.
It is guaranteed that the set of rows obtained from executing each query-part on a database snapshot and merging (without deduping) the results is equal to the set of rows obtained from executing the original query on the same snapshot with the rows containing NULL values in any of the split_column's excluded.
This is typically called by the MapReduce master when reading from Vitess. There it's desirable that the sets of rows returned by the query-parts have roughly the same size.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
keyspace to target the query to.
The query and bind variables to produce splits for. The given query must be a simple query of the form SELECT <cols> FROM <table> WHERE <filter>. It must not contain subqueries nor any of the keywords JOIN, GROUP BY, ORDER BY, LIMIT, DISTINCT. Furthermore, <table> must be a single “concrete” table. It cannot be a view.
Each generated query-part will be restricted to rows whose values in the columns listed in this field are in a particular range. The list of columns named here must be a prefix of the list of columns defining some index or primary key of the table referenced in 'query'. For many tables using the primary key columns (in order) is sufficient and this is the default if this field is omitted. See the comment on the 'algorithm' field for more restrictions and information.
You can specify either an estimate of the number of query-parts to generate or an estimate of the number of rows each query-part should return. Thus, exactly one of split_count or num_rows_per_query_part should be nonzero. The non-given parameter is calculated from the given parameter using the formula: split_count * num_rows_per_query_pary = table_size, where table_size is an approximation of the number of rows in the table. Note that if "split_count" is given it is regarded as an estimate. The number of query-parts returned may differ slightly (in particular, if it's not a whole multiple of the number of vitess shards).
The algorithm to use to split the query. The split algorithm is performed on each database shard in parallel. The lists of query-parts generated by the shards are merged and returned to the caller. Two algorithms are supported: EQUAL_SPLITS If this algorithm is selected then only the first 'split_column' given is used (or the first primary key column if the 'split_column' field is empty). In the rest of this algorithm's description, we refer to this column as "the split column". The split column must have numeric type (integral or floating point). The algorithm works by taking the interval [min, max], where min and max are the minimum and maximum values of the split column in the table-shard, respectively, and partitioning it into 'split_count' sub-intervals of equal size. The added WHERE clause of each query-part restricts that part to rows whose value in the split column belongs to a particular sub-interval. This is fast, but requires that the distribution of values of the split column be uniform in [min, max] for the number of rows returned by each query part to be roughly the same. FULL_SCAN If this algorithm is used then the split_column must be the primary key columns (in order). This algorithm performs a full-scan of the table-shard referenced in 'query' to get "boundary" rows that are num_rows_per_query_part apart when the table is ordered by the columns listed in 'split_column'. It then restricts each query-part to the rows located between two successive boundary rows. This algorithm supports multiple split_column's of any type, but is slower than EQUAL_SPLITS.
TODO(erez): This field is no longer used by the server code. Remove this field after this new server code is released to prod. We must keep it for now, so that clients can still send it to the old server code currently in production.
SplitQueryResponse is the returned value from SplitQuery.
SplitQueryResponse is the returned value from SplitQuery.
splits contains the queries to run to fetch the entire data set.
StreamExecuteKeyRangesRequest is the payload to StreamExecuteKeyRanges.
StreamExecuteKeyRangesRequest is the payload to StreamExecuteKeyRanges.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
query is the query and bind variables to execute.
keyspace to target the query to.
key_ranges contains the list of key ranges affected by this query. Will be used to find the shards to send the query to.
tablet_type is the type of tablets that this query is targeted to.
options
StreamExecuteKeyRangesResponse is the returned value from StreamExecuteKeyRanges.
StreamExecuteKeyRangesResponse is the returned value from StreamExecuteKeyRanges.
result contains the result data. The first value contains only Fields information. The next values contain the actual rows, a few values per result.
StreamExecuteKeyspaceIdsRequest is the payload to StreamExecuteKeyspaceIds.
StreamExecuteKeyspaceIdsRequest is the payload to StreamExecuteKeyspaceIds.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
query is the query and bind variables to execute.
keyspace to target the query to.
keyspace_ids contains the list of keyspace_ids affected by this query. Will be used to find the shards to send the query to.
tablet_type is the type of tablets that this query is targeted to.
options
StreamExecuteKeyspaceIdsResponse is the returned value from StreamExecuteKeyspaceIds.
StreamExecuteKeyspaceIdsResponse is the returned value from StreamExecuteKeyspaceIds.
result contains the result data. The first value contains only Fields information. The next values contain the actual rows, a few values per result.
StreamExecuteRequest is the payload to StreamExecute.
StreamExecuteRequest is the payload to StreamExecute.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
query is the query and bind variables to execute.
tablet_type is the type of tablets that this query is targeted to.
keyspace to target the query to.
options
StreamExecuteResponse is the returned value from StreamExecute.
StreamExecuteResponse is the returned value from StreamExecute.
result contains the result data. The first value contains only Fields information. The next values contain the actual rows, a few values per result.
StreamExecuteShardsRequest is the payload to StreamExecuteShards.
StreamExecuteShardsRequest is the payload to StreamExecuteShards.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
query is the query and bind variables to execute.
keyspace to target the query to.
shards to target the query to.
tablet_type is the type of tablets that this query is targeted to.
options
StreamExecuteShardsResponse is the returned value from StreamExecuteShards.
StreamExecuteShardsResponse is the returned value from StreamExecuteShards.
result contains the result data. The first value contains only Fields information. The next values contain the actual rows, a few values per result.
UpdateStreamRequest is the payload to UpdateStream.
UpdateStreamRequest is the payload to UpdateStream.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
keyspace to target the query to.
shard to target the query to, for unsharded keyspaces.
KeyRange to target the query to, for sharded keyspaces.
tablet_type is the type of tablets that this request is targeted to.
timestamp is the timestamp to start the stream from. It is unused is event is set, and we are only streaming from the shard described by event.shard.
event is the event to start the stream from. Note it is only used if we are streaming from exactly the same shard as this event was coming from. Otherwise we can't use this event, and will use the timestamp as a starting point.
UpdateStreamResponse is streamed by UpdateStream.
UpdateStreamResponse is streamed by UpdateStream.
event is one event from the stream.
resume_timestamp is the timestamp to resume streaming from if the client is interrupted. If the Update Stream only goes to one shard, this is equal to event.timestamp. If the Update Stream goes to multiple shards and aggregates, this is the minimum value of the current timestamp for all shards.
BeginRequest is the payload to Begin.
caller_id identifies the caller. This is the effective caller ID, set by the application to further identify the caller.
single_db specifies if the transaction should be restricted to a single database.