2015-06-10 19:22:08 +03:00
|
|
|
// Data definitions for service vtgateservice.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package vtgate;
|
|
|
|
|
2015-07-31 23:58:39 +03:00
|
|
|
option java_package="com.youtube.vitess.proto";
|
|
|
|
|
2015-06-10 19:26:39 +03:00
|
|
|
import "query.proto";
|
2015-06-19 18:20:58 +03:00
|
|
|
import "topodata.proto";
|
2015-06-10 19:22:08 +03:00
|
|
|
import "vtrpc.proto";
|
|
|
|
|
|
|
|
// 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.
|
|
|
|
message Session {
|
|
|
|
bool in_transaction = 1;
|
|
|
|
|
|
|
|
message ShardSession {
|
2015-06-10 19:26:39 +03:00
|
|
|
query.Target target = 1;
|
2015-06-10 19:22:08 +03:00
|
|
|
int64 transaction_id = 2;
|
|
|
|
}
|
|
|
|
repeated ShardSession shard_sessions = 2;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteRequest is the payload to Execute.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data. It is returned by Begin.
|
|
|
|
// Do not fill it in if outside of a transaction.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// not_in_transaction is deprecated and should not be used.
|
2015-06-10 19:22:08 +03:00
|
|
|
bool not_in_transaction = 5;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteResponse is the returned value from Execute.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// 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).
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.RPCError error = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session is the updated session information (only returned inside a transaction).
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// result contains the query result, only set if error is unset.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.QueryResult result = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteShardsRequest is the payload to ExecuteShards.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteShardsRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data. It is returned by Begin.
|
|
|
|
// Do not fill it in if outside of a transaction.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// shards to target the query to. A DML can only target one shard.
|
2015-06-10 19:22:08 +03:00
|
|
|
repeated string shards = 5;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 6;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// not_in_transaction is deprecated and should not be used.
|
2015-06-10 19:22:08 +03:00
|
|
|
bool not_in_transaction = 7;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteShardsResponse is the returned value from ExecuteShards.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteShardsResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// 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).
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.RPCError error = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session is the updated session information (only returned inside a transaction).
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// result contains the query result, only set if error is unset.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.QueryResult result = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteKeyspaceIdsRequest is the payload to ExecuteKeyspaceIds.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteKeyspaceIdsRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data. It is returned by Begin.
|
|
|
|
// Do not fill it in if outside of a transaction.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace_ids contains the list of keyspace_ids affected by this query.
|
|
|
|
// Will be used to find the shards to send the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
repeated bytes keyspace_ids = 5;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 6;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// not_in_transaction is deprecated and should not be used.
|
2015-06-10 19:22:08 +03:00
|
|
|
bool not_in_transaction = 7;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteKeyspaceIdsResponse is the returned value from ExecuteKeyspaceIds.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteKeyspaceIdsResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// 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).
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.RPCError error = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session is the updated session information (only returned inside a transaction).
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// result contains the query result, only set if error is unset.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.QueryResult result = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteKeyRangesRequest is the payload to ExecuteKeyRanges.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteKeyRangesRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data. It is returned by Begin.
|
|
|
|
// Do not fill it in if outside of a transaction.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// key_ranges contains the list of key ranges affected by this query.
|
|
|
|
// Will be used to find the shards to send the query to.
|
2015-06-19 18:20:58 +03:00
|
|
|
repeated topodata.KeyRange key_ranges = 5;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 6;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// not_in_transaction is deprecated and should not be used.
|
2015-06-10 19:22:08 +03:00
|
|
|
bool not_in_transaction = 7;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteKeyRangesResponse is the returned value from ExecuteKeyRanges.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteKeyRangesResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// 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).
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.RPCError error = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session is the updated session information (only returned inside a transaction).
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// result contains the query result, only set if error is unset.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.QueryResult result = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteEntityIdsRequest is the payload to ExecuteEntityIds.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteEntityIdsRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data. It is returned by Begin.
|
|
|
|
// Do not fill it in if outside of a transaction.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// entity_column_name is the column name to use.
|
2015-06-10 19:22:08 +03:00
|
|
|
string entity_column_name = 5;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
2015-06-10 19:22:08 +03:00
|
|
|
message EntityId {
|
2015-11-03 21:58:35 +03:00
|
|
|
// xid_type is the type of the entity's value. Can be NULL.
|
2015-10-26 08:02:58 +03:00
|
|
|
query.Type xid_type = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// xid_value is the value for the entity. Not set if xid_type is NULL.
|
2015-10-26 08:02:58 +03:00
|
|
|
bytes xid_value = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace_id is the associated keyspace_id for the entity.
|
2015-10-26 08:02:58 +03:00
|
|
|
bytes keyspace_id = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// entity_keyspace_ids are pairs of entity_column_name values
|
|
|
|
// associated with its corresponding keyspace_id.
|
2015-06-10 19:22:08 +03:00
|
|
|
repeated EntityId entity_keyspace_ids = 6;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 7;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// not_in_transaction is deprecated and should not be used.
|
2015-06-10 19:22:08 +03:00
|
|
|
bool not_in_transaction = 8;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteEntityIdsResponse is the returned value from ExecuteEntityIds.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteEntityIdsResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// 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).
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.RPCError error = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session is the updated session information (only returned inside a transaction).
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// result contains the query result, only set if error is unset.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.QueryResult result = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-07-10 20:38:09 +03:00
|
|
|
// BoundShardQuery represents a single query request for the
|
|
|
|
// specified list of shards. This is used in a list for
|
|
|
|
// ExecuteBatchShardsRequest.
|
|
|
|
message BoundShardQuery {
|
2015-11-03 21:58:35 +03:00
|
|
|
// query is the query and bind variables to execute.
|
2015-07-10 20:38:09 +03:00
|
|
|
query.BoundQuery query = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-07-10 20:38:09 +03:00
|
|
|
string keyspace = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// shards to target the query to. A DML can only target one shard.
|
2015-07-10 20:38:09 +03:00
|
|
|
repeated string shards = 3;
|
|
|
|
}
|
|
|
|
|
2015-06-10 19:22:08 +03:00
|
|
|
// ExecuteBatchShardsRequest is the payload to ExecuteBatchShards
|
|
|
|
message ExecuteBatchShardsRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data. It is returned by Begin.
|
|
|
|
// Do not fill it in if outside of a transaction.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// queries carries all the queries to execute.
|
2015-07-10 20:38:09 +03:00
|
|
|
repeated BoundShardQuery queries = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// as_transaction will make all the requests inside its own transaction.
|
2015-07-17 14:14:33 +03:00
|
|
|
bool as_transaction = 5;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteBatchShardsResponse is the returned value from ExecuteBatchShards.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteBatchShardsResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// 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).
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.RPCError error = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session is the updated session information (only returned inside a transaction).
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// result contains the query result, only set if error is unset.
|
2015-06-10 19:26:39 +03:00
|
|
|
repeated query.QueryResult results = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-07-10 20:38:09 +03:00
|
|
|
// BoundKeyspaceIdQuery represents a single query request for the
|
|
|
|
// specified list of keyspace ids. This is used in a list for
|
|
|
|
// ExecuteBatchKeyspaceIdsRequest.
|
|
|
|
message BoundKeyspaceIdQuery {
|
2015-11-03 21:58:35 +03:00
|
|
|
// query is the query and bind variables to execute.
|
2015-07-10 20:38:09 +03:00
|
|
|
query.BoundQuery query = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-07-10 20:38:09 +03:00
|
|
|
string keyspace = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace_ids contains the list of keyspace_ids affected by this query.
|
|
|
|
// Will be used to find the shards to send the query to.
|
2015-07-10 20:38:09 +03:00
|
|
|
repeated bytes keyspace_ids = 3;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteBatchKeyspaceIdsRequest is the payload to ExecuteBatchKeyspaceId.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteBatchKeyspaceIdsRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data. It is returned by Begin.
|
|
|
|
// Do not fill it in if outside of a transaction.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
2015-07-10 20:38:09 +03:00
|
|
|
repeated BoundKeyspaceIdQuery queries = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// as_transaction will make all the requests inside its own transaction.
|
2015-07-17 14:14:33 +03:00
|
|
|
bool as_transaction = 5;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// ExecuteBatchKeyspaceIdsResponse is the returned value from ExecuteBatchKeyspaceId.
|
2015-06-10 19:22:08 +03:00
|
|
|
message ExecuteBatchKeyspaceIdsResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// 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).
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.RPCError error = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session is the updated session information (only returned inside a transaction).
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// result contains the query result, only set if error is unset.
|
2015-06-10 19:26:39 +03:00
|
|
|
repeated query.QueryResult results = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteRequest is the payload to StreamExecute.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 3;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteResponse is the returned value from StreamExecute.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// result contains the result data.
|
|
|
|
// The first value contains only Fields information.
|
|
|
|
// The next values contain the actual rows, a few values per result.
|
2015-09-16 00:57:21 +03:00
|
|
|
query.QueryResult result = 1;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteShardsRequest is the payload to StreamExecuteShards.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteShardsRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// shards to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
repeated string shards = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 5;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteShardsResponse is the returned value from StreamExecuteShards.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteShardsResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// result contains the result data.
|
|
|
|
// The first value contains only Fields information.
|
|
|
|
// The next values contain the actual rows, a few values per result.
|
2015-09-16 00:57:21 +03:00
|
|
|
query.QueryResult result = 1;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteKeyspaceIdsRequest is the payload to StreamExecuteKeyspaceIds.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteKeyspaceIdsRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace_ids contains the list of keyspace_ids affected by this query.
|
|
|
|
// Will be used to find the shards to send the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
repeated bytes keyspace_ids = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 5;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteKeyspaceIdsResponse is the returned value from StreamExecuteKeyspaceIds.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteKeyspaceIdsResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// result contains the result data.
|
|
|
|
// The first value contains only Fields information.
|
|
|
|
// The next values contain the actual rows, a few values per result.
|
2015-09-16 00:57:21 +03:00
|
|
|
query.QueryResult result = 1;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteKeyRangesRequest is the payload to StreamExecuteKeyRanges.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteKeyRangesRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// key_ranges contains the list of key ranges affected by this query.
|
|
|
|
// Will be used to find the shards to send the query to.
|
2015-06-19 18:20:58 +03:00
|
|
|
repeated topodata.KeyRange key_ranges = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// tablet_type is the type of tablets that this query is targeted to.
|
2015-07-20 16:54:12 +03:00
|
|
|
topodata.TabletType tablet_type = 5;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// StreamExecuteKeyRangesResponse is the returned value from StreamExecuteKeyRanges.
|
2015-06-10 19:22:08 +03:00
|
|
|
message StreamExecuteKeyRangesResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// result contains the result data.
|
|
|
|
// The first value contains only Fields information.
|
|
|
|
// The next values contain the actual rows, a few values per result.
|
2015-09-16 00:57:21 +03:00
|
|
|
query.QueryResult result = 1;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// BeginRequest is the payload to Begin.
|
2015-06-10 19:22:08 +03:00
|
|
|
message BeginRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// BeginResponse is the returned value from Begin.
|
2015-06-10 19:22:08 +03:00
|
|
|
message BeginResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// session is the initial session information to use for subsequent queries.
|
2015-09-16 00:57:21 +03:00
|
|
|
Session session = 1;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// CommitRequest is the payload to Commit.
|
2015-06-10 19:22:08 +03:00
|
|
|
message CommitRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data to commit.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// CommitResponse is the returned value from Commit.
|
2015-06-10 19:22:08 +03:00
|
|
|
message CommitResponse {
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// RollbackRequest is the payload to Rollback.
|
2015-06-10 19:22:08 +03:00
|
|
|
message RollbackRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// session carries the current transaction data to rollback.
|
2015-06-10 19:22:08 +03:00
|
|
|
Session session = 2;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// RollbackResponse is the returned value from Rollback.
|
2015-06-10 19:22:08 +03:00
|
|
|
message RollbackResponse {
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// SplitQueryRequest is the payload to SplitQuery.
|
2015-06-10 19:22:08 +03:00
|
|
|
message SplitQueryRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// caller_id identifies the caller. This is the effective caller ID,
|
2015-11-03 22:08:02 +03:00
|
|
|
// set by the application to further identify the caller.
|
2015-06-10 19:22:08 +03:00
|
|
|
vtrpc.CallerID caller_id = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// query is the query and bind variables to produce splits for.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// split_column is an optional hint on the column to use to split the query.
|
2015-07-20 20:24:31 +03:00
|
|
|
string split_column = 4;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// split_count describes how many splits we want for this query.
|
2015-07-20 20:24:31 +03:00
|
|
|
int64 split_count = 5;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// SplitQueryResponse is the returned value from SplitQuery.
|
2015-06-10 19:22:08 +03:00
|
|
|
message SplitQueryResponse {
|
|
|
|
message KeyRangePart {
|
2015-11-03 21:58:35 +03:00
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// key ranges to target the query to.
|
2015-06-19 18:20:58 +03:00
|
|
|
repeated topodata.KeyRange key_ranges = 2;
|
2015-06-10 19:22:08 +03:00
|
|
|
}
|
|
|
|
message ShardPart {
|
2015-11-03 21:58:35 +03:00
|
|
|
// keyspace to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
string keyspace = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// shards to target the query to.
|
2015-06-10 19:22:08 +03:00
|
|
|
repeated string shards = 2;
|
|
|
|
}
|
|
|
|
message Part {
|
2015-11-03 21:58:35 +03:00
|
|
|
// query is the query and bind variables to execute.
|
2015-06-10 19:26:39 +03:00
|
|
|
query.BoundQuery query = 1;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// key_range_part is set if the query should be executed by ExecuteKeyRanges.
|
2015-06-10 19:22:08 +03:00
|
|
|
KeyRangePart key_range_part = 2;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// shard_part is set if the query should be executed by ExecuteShards.
|
2015-06-10 19:22:08 +03:00
|
|
|
ShardPart shard_part = 3;
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// size is the approximate number of rows this query will return.
|
2015-06-10 19:22:08 +03:00
|
|
|
int64 size = 4;
|
|
|
|
}
|
2015-11-03 21:58:35 +03:00
|
|
|
|
|
|
|
// splits contains the queries to run to fetch the entire data set.
|
2015-06-10 19:22:08 +03:00
|
|
|
repeated Part splits = 1;
|
|
|
|
}
|
2015-07-29 01:55:06 +03:00
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// GetSrvKeyspaceRequest is the payload to GetSrvKeyspace.
|
2015-07-29 01:55:06 +03:00
|
|
|
message GetSrvKeyspaceRequest {
|
2015-11-03 21:58:35 +03:00
|
|
|
// keyspace name to fetch.
|
2015-07-29 01:55:06 +03:00
|
|
|
string keyspace = 1;
|
|
|
|
}
|
|
|
|
|
2015-11-03 21:58:35 +03:00
|
|
|
// GetSrvKeyspaceResponse is the returned value from GetSrvKeyspace.
|
2015-07-29 01:55:06 +03:00
|
|
|
message GetSrvKeyspaceResponse {
|
2015-11-03 21:58:35 +03:00
|
|
|
// srv_keyspace is the topology object for the SrvKeyspace.
|
2015-07-29 01:55:06 +03:00
|
|
|
topodata.SrvKeyspace srv_keyspace = 1;
|
|
|
|
}
|