*: support count in range query

This commit is contained in:
Xiang Li
2016-06-21 16:20:55 -07:00
parent c01c36bcfd
commit def21f11a9
8 changed files with 406 additions and 286 deletions

View File

@ -930,6 +930,11 @@
"etcdserverpbRangeRequest": {
"type": "object",
"properties": {
"count_only": {
"type": "boolean",
"format": "boolean",
"description": "count_only when set returns only the count of the keys in the range."
},
"key": {
"type": "string",
"format": "byte",
@ -973,6 +978,11 @@
"etcdserverpbRangeResponse": {
"type": "object",
"properties": {
"count": {
"type": "string",
"format": "int64",
"description": "count is set to the number of keys within the range when requested."
},
"header": {
"$ref": "#/definitions/etcdserverpbResponseHeader"
},
@ -981,7 +991,7 @@
"items": {
"$ref": "#/definitions/mvccpbKeyValue"
},
"description": "kvs is the list of key-value pairs matched by the range request."
"description": "kvs is the list of key-value pairs matched by the range request.\nkvs is empty when count is requested."
},
"more": {
"type": "boolean",