1 .TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "July 31, 2012" "1.0.10" "libmemcached"
3 memcached_decrement_with_initial \- Incrementing and Decrementing Values
5 .nr rst2man-indent-level 0
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17 .\" .rstReportMargin pre:
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 .\" Man page generated from reStructeredText.
35 #include <libmemcached/memcached.h>
38 .B memcached_return_t memcached_increment(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
42 .B memcached_return_t memcached_decrement(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
46 .B memcached_return_t memcached_increment_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
50 .B memcached_return_t memcached_decrement_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
54 .B memcached_return_t memcached_increment_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
58 .B memcached_return_t memcached_decrement_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
62 .B memcached_return_t memcached_increment_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
66 .B memcached_return_t memcached_decrement_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
69 Compile and link with \-lmemcached
72 \fImemcached(1)\fP servers have the ability to increment and decrement keys
73 (overflow and underflow are not detected). This gives you the ability to use
74 memcached to generate shared sequences of values.
76 memcached_increment takes a key and keylength and increments the value by
77 the offset passed to it. The value is then returned via the uint32_t
78 value pointer you pass to it.
80 memcached_decrement takes a key and keylength and decrements the value by
81 the offset passed to it. The value is then returned via the uint32_t
82 value pointer you pass to it.
84 memcached_increment_with_initial takes a key and keylength and increments
85 the value by the offset passed to it. If the object specified by key does
86 not exist, one of two things may happen: If the expiration value is
87 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
88 expiration values, the operation will succeed by seeding the value for that
89 key with a initial value to expire with the provided expiration time. The
90 flags will be set to zero.The value is then returned via the uint32_t
91 value pointer you pass to it.
93 memcached_decrement_with_initial takes a key and keylength and decrements
94 the value by the offset passed to it. If the object specified by key does
95 not exist, one of two things may happen: If the expiration value is
96 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
97 expiration values, the operation will succeed by seeding the value for that
98 key with a initial value to expire with the provided expiration time. The
99 flags will be set to zero.The value is then returned via the uint32_t
100 value pointer you pass to it.
102 \fI\%memcached_increment_by_key()\fP, \fI\%memcached_decrement_by_key()\fP,
103 \fI\%memcached_increment_with_initial_by_key()\fP, and
104 \fI\%memcached_decrement_with_initial_by_key()\fP are master key equivalents of the above.
107 A value of type \fBmemcached_return_t\fP is returned.
108 On success that value will be \fBMEMCACHED_SUCCESS\fP.
109 Use memcached_strerror to translate this value to a printable string.
112 To find out more information please check:
113 \fI\%http://libmemcached.org/\fP
116 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
120 2011, Brian Aker DataDifferential, http://datadifferential.com/
121 .\" Generated by docutils manpage writer.