Incrementing and Decrementing Values
====================================
.. index:: object: memcached_st
Incrementing and Decrementing Values
====================================
.. index:: object: memcached_st
.. function:: memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, uint32_t offset, uint64_t *value)
.. function:: memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, uint32_t offset, uint64_t *value)
.. function:: memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, uint32_t offset, uint64_t *value)
.. function:: memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, uint32_t offset, uint64_t *value)
:manpage:`memcached(1)` servers have the ability to increment and decrement keys
(overflow and underflow are not detected). This gives you the ability to use
memcached to generate shared sequences of values.
:manpage:`memcached(1)` servers have the ability to increment and decrement keys
(overflow and underflow are not detected). This gives you the ability to use
memcached to generate shared sequences of values.
:func:`memcached_increment_with_initial_by_key`, and
:func:`memcached_decrement_with_initial_by_key` are master key equivalents of the above.
:func:`memcached_increment_with_initial_by_key`, and
:func:`memcached_decrement_with_initial_by_key` are master key equivalents of the above.
A value of type :type:`memcached_return_t` is returned.
On success that value will be `MEMCACHED_SUCCESS`.
Use memcached_strerror to translate this value to a printable string.
A value of type :type:`memcached_return_t` is returned.
On success that value will be `MEMCACHED_SUCCESS`.
Use memcached_strerror to translate this value to a printable string.