OLD | NEW |
(Empty) | |
| 1 syntax = "proto2"; |
| 2 |
| 3 package apphosting.datastore.v4; |
| 4 |
| 5 message PartitionId { |
| 6 enum Constants { |
| 7 MAX_DIMENSION_TAG = 100; |
| 8 } |
| 9 optional string dataset_id = 3; |
| 10 optional string namespace = 4; |
| 11 } |
| 12 |
| 13 message Key { |
| 14 optional PartitionId partition_id = 1; |
| 15 |
| 16 message PathElement { |
| 17 required string kind = 1; |
| 18 optional int64 id = 2; |
| 19 optional string name = 3; |
| 20 } |
| 21 |
| 22 repeated PathElement path_element = 2; |
| 23 } |
| 24 |
| 25 message GeoPoint { |
| 26 required double latitude = 1; |
| 27 required double longitude = 2; |
| 28 } |
| 29 |
| 30 message Value { |
| 31 optional bool boolean_value = 1; |
| 32 optional int64 integer_value = 2; |
| 33 optional double double_value = 3; |
| 34 optional int64 timestamp_microseconds_value = 4; |
| 35 optional Key key_value = 5; |
| 36 optional string blob_key_value = 16; |
| 37 optional string string_value = 17; |
| 38 optional bytes blob_value = 18; |
| 39 optional Entity entity_value = 6; |
| 40 optional GeoPoint geo_point_value = 8; |
| 41 repeated Value list_value = 7; |
| 42 |
| 43 optional int32 meaning = 14; |
| 44 optional bool indexed = 15 [default = true]; |
| 45 } |
| 46 |
| 47 message Property { |
| 48 required string name = 1; |
| 49 optional bool deprecated_multi = 2 [default = false]; |
| 50 repeated Value deprecated_value = 3; |
| 51 optional Value value = 4; |
| 52 } |
| 53 |
| 54 message Entity { |
| 55 optional Key key = 1; |
| 56 repeated Property property = 2; |
| 57 } |
| 58 |
| 59 message Error { |
| 60 enum ErrorCode { |
| 61 BAD_REQUEST = 1; |
| 62 CONCURRENT_TRANSACTION = 2; |
| 63 INTERNAL_ERROR = 3; |
| 64 NEED_INDEX = 4; |
| 65 TIMEOUT = 5; |
| 66 PERMISSION_DENIED = 6; |
| 67 BIGTABLE_ERROR = 7; |
| 68 COMMITTED_BUT_STILL_APPLYING = 8; |
| 69 CAPABILITY_DISABLED = 9; |
| 70 TRY_ALTERNATE_BACKEND = 10; |
| 71 SAFE_TIME_TOO_OLD = 11; |
| 72 } |
| 73 } |
| 74 |
| 75 message EntityResult { |
| 76 enum ResultType { |
| 77 FULL = 1; |
| 78 PROJECTION = 2; |
| 79 KEY_ONLY = 3; |
| 80 } |
| 81 |
| 82 required Entity entity = 1; |
| 83 optional int64 version = 2; |
| 84 } |
| 85 |
| 86 message Query { |
| 87 repeated PropertyExpression projection = 2; |
| 88 repeated KindExpression kind = 3; |
| 89 optional Filter filter = 4; |
| 90 repeated PropertyOrder order = 5; |
| 91 repeated PropertyReference group_by = 6; |
| 92 optional bytes /* serialized QueryCursor */ start_cursor = 7; |
| 93 optional bytes /* serialized QueryCursor */ end_cursor = 8; |
| 94 optional int32 offset = 10 [default = 0]; |
| 95 optional int32 limit = 11; |
| 96 } |
| 97 |
| 98 message KindExpression { |
| 99 required string name = 1; |
| 100 } |
| 101 |
| 102 message PropertyReference { |
| 103 required string name = 2; |
| 104 } |
| 105 |
| 106 message PropertyExpression { |
| 107 enum AggregationFunction { |
| 108 FIRST = 1; |
| 109 } |
| 110 required PropertyReference property = 1; |
| 111 optional AggregationFunction aggregation_function = 2; |
| 112 } |
| 113 |
| 114 message PropertyOrder { |
| 115 enum Direction { |
| 116 ASCENDING = 1; |
| 117 DESCENDING = 2; |
| 118 } |
| 119 required PropertyReference property = 1; |
| 120 optional Direction direction = 2 [default = ASCENDING]; |
| 121 } |
| 122 |
| 123 message Filter { |
| 124 optional CompositeFilter composite_filter = 1; |
| 125 optional PropertyFilter property_filter = 2; |
| 126 } |
| 127 |
| 128 message CompositeFilter { |
| 129 enum Operator { |
| 130 AND = 1; |
| 131 } |
| 132 |
| 133 required Operator operator = 1; |
| 134 repeated Filter filter = 2; |
| 135 } |
| 136 |
| 137 message PropertyFilter { |
| 138 enum Operator { |
| 139 LESS_THAN = 1; |
| 140 LESS_THAN_OR_EQUAL = 2; |
| 141 GREATER_THAN = 3; |
| 142 GREATER_THAN_OR_EQUAL = 4; |
| 143 EQUAL = 5; |
| 144 |
| 145 HAS_ANCESTOR = 11; |
| 146 } |
| 147 |
| 148 required PropertyReference property = 1; |
| 149 required Operator operator = 2; |
| 150 required Value value = 3; |
| 151 } |
| 152 |
| 153 message GqlQuery { |
| 154 required string query_string = 1; |
| 155 optional bool allow_literal = 2 [default = false]; |
| 156 repeated GqlQueryArg name_arg = 3; |
| 157 repeated GqlQueryArg number_arg = 4; |
| 158 } |
| 159 |
| 160 message GqlQueryArg { |
| 161 optional string name = 1; |
| 162 optional Value value = 2; |
| 163 optional bytes cursor = 3; |
| 164 } |
| 165 |
| 166 message QueryResultBatch { |
| 167 enum MoreResultsType { |
| 168 NOT_FINISHED = 1; |
| 169 MORE_RESULTS_AFTER_LIMIT = 2; |
| 170 NO_MORE_RESULTS = 3; |
| 171 } |
| 172 |
| 173 required EntityResult.ResultType entity_result_type = 1; |
| 174 repeated EntityResult entity_result = 2; |
| 175 |
| 176 optional bytes /* serialized QueryCursor */ end_cursor = 4; |
| 177 |
| 178 required MoreResultsType more_results = 5; |
| 179 optional int32 skipped_results = 6 [default = 0]; |
| 180 } |
| 181 |
| 182 message Mutation { |
| 183 enum Operation { |
| 184 INSERT = 1; |
| 185 UPDATE = 2; |
| 186 UPSERT = 3; |
| 187 DELETE = 4; |
| 188 } |
| 189 optional Operation op = 1 [default = UPSERT]; |
| 190 optional apphosting.datastore.v4.Key key = 2; |
| 191 optional apphosting.datastore.v4.Entity entity = 3; |
| 192 } |
| 193 |
| 194 message MutationResult { |
| 195 optional apphosting.datastore.v4.Key key = 3; |
| 196 optional int64 new_version = 4 [default = 0]; |
| 197 } |
| 198 |
| 199 message DeprecatedMutation { |
| 200 repeated Entity upsert = 1; |
| 201 repeated Entity update = 2; |
| 202 repeated Entity insert = 3; |
| 203 repeated Entity insert_auto_id = 4; |
| 204 repeated Key delete = 5; |
| 205 optional bool force = 6 [default = false]; |
| 206 } |
| 207 |
| 208 message DeprecatedMutationResult { |
| 209 required int32 index_updates = 1; |
| 210 repeated Key insert_auto_id_key = 2; |
| 211 |
| 212 repeated int64 upsert_version = 3; |
| 213 repeated int64 update_version = 4; |
| 214 repeated int64 insert_version = 5; |
| 215 repeated int64 insert_auto_id_version = 6; |
| 216 repeated int64 delete_version = 7; |
| 217 } |
| 218 |
| 219 message ReadOptions { |
| 220 enum ReadConsistency { |
| 221 DEFAULT = 0; |
| 222 STRONG = 1; |
| 223 EVENTUAL = 2; |
| 224 } |
| 225 optional ReadConsistency read_consistency = 1 [default = DEFAULT]; |
| 226 optional bytes /* serialized Transaction */ transaction = 2; |
| 227 } |
| 228 |
| 229 message LookupRequest { |
| 230 optional ReadOptions read_options = 1; |
| 231 repeated Key key = 3; |
| 232 } |
| 233 |
| 234 message LookupResponse { |
| 235 repeated EntityResult found = 1; |
| 236 |
| 237 repeated EntityResult missing = 2; |
| 238 |
| 239 repeated Key deferred = 3; |
| 240 } |
| 241 |
| 242 message RunQueryRequest { |
| 243 optional ReadOptions read_options = 1; |
| 244 |
| 245 optional PartitionId partition_id = 2; |
| 246 |
| 247 optional Query query = 3; |
| 248 optional GqlQuery gql_query = 7; |
| 249 |
| 250 optional int64 min_safe_time_seconds = 4; |
| 251 |
| 252 optional int32 suggested_batch_size = 5; |
| 253 } |
| 254 |
| 255 message RunQueryResponse { |
| 256 required QueryResultBatch batch = 1; |
| 257 optional bytes /* serialized QueryHandle */ query_handle = 2; |
| 258 } |
| 259 |
| 260 message ContinueQueryRequest { |
| 261 required bytes /* serialized QueryHandle */ query_handle = 1; |
| 262 } |
| 263 |
| 264 message ContinueQueryResponse { |
| 265 required QueryResultBatch batch = 1; |
| 266 } |
| 267 |
| 268 message BeginTransactionRequest { |
| 269 optional bool cross_group = 1 [default = false]; |
| 270 |
| 271 optional bool cross_request = 2 [default = false]; |
| 272 } |
| 273 |
| 274 message BeginTransactionResponse { |
| 275 required bytes /* serialized Transaction */ transaction = 1; |
| 276 } |
| 277 |
| 278 message RollbackRequest { |
| 279 required bytes /* serialized Transaction */ transaction = 1; |
| 280 } |
| 281 |
| 282 message RollbackResponse {} |
| 283 |
| 284 message CommitRequest { |
| 285 enum Mode { |
| 286 TRANSACTIONAL = 1; |
| 287 NON_TRANSACTIONAL = 2; |
| 288 } |
| 289 optional bytes /* serialized Transaction */ transaction = 1; |
| 290 repeated Mutation mutation = 5; |
| 291 optional DeprecatedMutation deprecated_mutation = 2; |
| 292 optional Mode mode = 4 [default = TRANSACTIONAL]; |
| 293 optional bool ignore_read_only = 6 [default = false]; |
| 294 } |
| 295 |
| 296 message CommitResponse { |
| 297 repeated MutationResult mutation_result = 3; |
| 298 optional DeprecatedMutationResult deprecated_mutation_result = 1; |
| 299 optional int32 index_updates = 4; |
| 300 } |
| 301 |
| 302 message AllocateIdsRequest { |
| 303 repeated Key allocate = 1; |
| 304 |
| 305 repeated Key reserve = 2; |
| 306 } |
| 307 |
| 308 message AllocateIdsResponse { |
| 309 repeated Key allocated = 1; |
| 310 } |
OLD | NEW |