forked from Qihoo360/huststore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
HustXrb
authored and
jobs
committed
Dec 21, 2016
1 parent
af18d89
commit 99efd62
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## hincrby ## | ||
|
||
**Interface:** `/hustdb/hincrby` | ||
|
||
**Method:** `GET | POST` | ||
|
||
**Parameter:** | ||
|
||
* **tb** (Required) | ||
* **key** (Required) | ||
* **val** (Required, GET: val is argument or POST: val is body) | ||
* **ttl** (Optional, default: 0) | ||
* **ver** (Optional, default: 0) | ||
|
||
**Sample A:** | ||
|
||
curl -i -X GET "http://localhost:8085/hustdb/hset?tb=test_table&key=test_key&val=7" | ||
|
||
**Result A1:** | ||
|
||
HTTP/1.1 412 Precondition Failed //tb maybe not hash, reject hash request;or tb not exist | ||
Version: 0 | ||
VerError: false | ||
|
||
**Result A2:** | ||
|
||
HTTP/1.1 200 OK | ||
Version: 1 | ||
VerError: false | ||
Content-Length: 2 | ||
Content-Type: text/plain | ||
|
||
16 //if original value of test_key is 9, 9 + 7 = 16 | ||
|
||
**Sample B:** | ||
|
||
curl -i -X GET "http://localhost:8085/hustdb/hset?tb=test_table&key=test_key&val=7&ver=2" | ||
|
||
**Result B1:** | ||
|
||
HTTP/1.1 401 Unauthorized | ||
Version: 1 | ||
VerError: true | ||
|
||
[Previous](../hustcache.md) | ||
|
||
[Home](../../../index.md) |