X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fsource%2Flibmemcached%2Fmemcached_fetch.rst;h=0d58d6163423ac2e26e697e1c759e7c0a4b22240;hb=6e732f43b86a64b49fbb02d2b5da1a1a1152ddb9;hp=3fd638f13ac438f6448a8252069383ee983a78df;hpb=9d8ad7151bed36742138f7422307d19d0d64373c;p=awesomized%2Flibmemcached diff --git a/docs/source/libmemcached/memcached_fetch.rst b/docs/source/libmemcached/memcached_fetch.rst index 3fd638f1..0d58d616 100644 --- a/docs/source/libmemcached/memcached_fetch.rst +++ b/docs/source/libmemcached/memcached_fetch.rst @@ -1,60 +1,71 @@ -================= memcached_fetch ================= -.. index:: object: memcached_st - --------- SYNOPSIS -------- - #include - -.. c:function:: char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error) + Compile and link with -lmemcached - .. deprecated:: 0.50 - Use :c:func:`memcached_fetch_result` instead. +.. function:: char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error) -Compile and link with -lmemcached + .. deprecated:: 0.50 + Use :func:`memcached_fetch_result` instead. ------------ DESCRIPTION ----------- -:c:func:`memcached_fetch` is used to fetch an individual value from the server. :c:func:`memcached_mget` must always be called before using this method. -You must pass in a key and its length to fetch the object. You must supply -three pointer variables which will give you the state of the returned -object. A :c:type:`uint32_t` pointer to contain whatever flags you stored with the value, a :c:type:`size_t` pointer which will be filled with size of of the -object, and a :c:type:`memcached_return_t` pointer to hold any error. The -object will be returned upon success and NULL will be returned on failure. :c:type:`MEMCACHED_END` is returned by the \*error value when all objects that have been found are returned. The final value upon :c:type:`MEMCACHED_END` is null. +:func:`memcached_fetch` is used to fetch an individual value from the server. +:func:`memcached_mget` must always be called before using this method. +You must pass in a key and its length to fetch the object. -Values returned by :c:func:`memcached_fetch` must be freed by the caller. +You must supply three pointer variables which will give you the state of the returned +object: -All of the above functions are not tested when the -:c:type:`MEMCACHED_BEHAVIOR_USE_UDP` has been set. Executing any of these -functions with this behavior on will result in :c:type:`MEMCACHED_NOT_SUPPORTED` being returned, or for those functions which do not return a :c:type:`memcached_return_t`, the error function parameter will be set to :c:type:`MEMCACHED_NOT_SUPPORTED`. + * A :type:`uint32_t` pointer to contain whatever flags you stored with the value, + * a :type:`size_t` pointer which will be filled with size of of the object, and + * a :type:`memcached_return_t` pointer to hold any error. +The object will be returned upon success and NULL will be returned on failure. ------- -RETURN ------- +`MEMCACHED_END` is returned by the error value when all objects that have been found are returned. +The final value upon `MEMCACHED_END` is a NULL pointer. -:c:func:`memcached_fetch` sets error to -to :c:type:`MEMCACHED_END` upon successful conclusion. -:c:type:`MEMCACHED_NOTFOUND` will be return if no keys at all were found. +Values returned by :func:`memcached_fetch` must be freed by the caller. -:c:type:`MEMCACHED_KEY_TOO_BIG` is set to error whenever :c:func:`memcached_fetch` was used -and the key was set larger then :c:type:`MEMCACHED_MAX_KEY`, which was the largest -key allowed for the original memcached ascii server. +All of the above functions are not tested when the +`MEMCACHED_BEHAVIOR_USE_UDP` has been set. Executing any of these +functions with this behavior on will result in `MEMCACHED_NOT_SUPPORTED` +being returned, or for those functions which do not return a +:type:`memcached_return_t`, the error function parameter will +be set to `MEMCACHED_NOT_SUPPORTED`. +RETURN VALUE +------------ + +:func:`memcached_fetch` sets error to +to `MEMCACHED_END` upon successful conclusion. + +`MEMCACHED_NOTFOUND` will be return if no keys at all were found. + +`MEMCACHED_KEY_TOO_BIG` is set to error whenever :func:`memcached_fetch` was used +and the key was set larger then `MEMCACHED_MAX_KEY`, which was the largest +key allowed for the original memcached ascii server. --------- SEE ALSO -------- .. only:: man - :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)` :manpage:`memcached_fetch_result(3)` + :manpage:`memcached(1)` + :manpage:`libmemcached(3)` + :manpage:`memcached_strerror(3)` + :manpage:`memcached_fetch_result(3)` + +.. only:: html + * :manpage:`memcached(1)` + * :doc:`../libmemcached` + * :doc:`memcached_strerror` + * :doc:`memcached_get`