X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fsource%2Flibmemcached%2Fmemcached_fetch.rst;h=a7f438a92d0c1bc80b68d526c220bec9b1e04664;hb=e1833e25ab4a98f9a3f9f9268185af57b2280eaf;hp=4df61ab899f9c93c917c388c342ab0ad303ccc7a;hpb=28c4d79e109e11d7d2a9f3189de57da28302ec68;p=m6w6%2Flibmemcached diff --git a/docs/source/libmemcached/memcached_fetch.rst b/docs/source/libmemcached/memcached_fetch.rst index 4df61ab8..a7f438a9 100644 --- a/docs/source/libmemcached/memcached_fetch.rst +++ b/docs/source/libmemcached/memcached_fetch.rst @@ -8,9 +8,8 @@ memcached_fetch SYNOPSIS -------- - #include - + .. function:: char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error) .. deprecated:: 0.50 @@ -18,30 +17,28 @@ SYNOPSIS Compile and link with -lmemcached - ----------- DESCRIPTION ----------- -:func:`memcached_fetch` is used to fetch an individual value from the server. :func:`memcached_mget` must always be called before using this method. +: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. You must supply three pointer variables which will give you the state of the returned object. 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. `MEMCACHED_END` is returned by the \*error value when all objects that have been found are returned. The final value upon `MEMCACHED_END` is null. -Values returned by :func:`memcached_fetch` must be freed by the caller. +Values returned by :func:`memcached_fetch` must be freed by the caller. -All of the above functions are not tested when the +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 ------ -:func:`memcached_fetch` sets error to +:func:`memcached_fetch` sets error to to `MEMCACHED_END` upon successful conclusion. `MEMCACHED_NOTFOUND` will be return if no keys at all were found. @@ -49,7 +46,6 @@ to `MEMCACHED_END` upon successful conclusion. and the key was set larger then `MEMCACHED_MAX_KEY`, which was the largest key allowed for the original memcached ascii server. - -------- SEE ALSO --------