Merge in all updates (new manual files as well).
[awesomized/libmemcached] / docs / man / memcached_fetch.3
1 .TH "MEMCACHED_FETCH" "3" "January 26, 2012" "1.0.3" "libmemcached"
2 .SH NAME
3 memcached_fetch \- Retrieving data from the server
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
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
30 ..
31 .\" Man page generated from reStructeredText.
32 .
33 .SH SYNOPSIS
34 .sp
35 #include <libmemcached/memcached.h>
36 .INDENT 0.0
37 .TP
38 .B char *memcached_fetch(memcached_st\fI\ *ptr\fP, char\fI\ *key\fP, size_t\fI\ *key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
39 Deprecated since version 0.50: Use \fBmemcached_fetch_result()\fP instead.
40 .UNINDENT
41 .sp
42 Compile and link with \-lmemcached
43 .SH DESCRIPTION
44 .sp
45 \fI\%memcached_fetch()\fP is used to fetch an individual value from the server. \fBmemcached_mget()\fP must always be called before using this method.
46 You must pass in a key and its length to fetch the object. You must supply
47 three pointer variables which will give you the state of the returned
48 object. A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
49 object, and a \fBmemcached_return_t\fP pointer to hold any error. The
50 object will be returned upon success and NULL will be returned on failure. \fBMEMCACHD_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
51 .sp
52 Values returned by \fI\%memcached_fetch()\fP must be freed by the caller.
53 .sp
54 All of the above functions are not tested when the
55 \fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
56 functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP.
57 .SH RETURN
58 .sp
59 \fI\%memcached_fetch()\fP sets error to
60 to \fBMEMCACHED_END\fP upon successful conclusion.
61 \fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
62 .sp
63 \fBMEMCACHED_KEY_TOO_BIG\fP is set to error whenever :c:\fBmemcached_fetch()\fP was used
64 and the key was set larger then \fBMEMCACHED_MAX_KEY\fP, which was the largest
65 key allowed for the original memcached ascii server.
66 .SH HOME
67 .sp
68 To find out more information please check:
69 \fI\%http://libmemcached.org/\fP
70 .SH SEE ALSO
71 .sp
72 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_fetch_result(3)\fP
73 .SH AUTHOR
74 Brian Aker
75 .SH COPYRIGHT
76 2011, Brian Aker DataDifferential, http://datadifferential.com/
77 .\" Generated by docutils manpage writer.
78 .\"
79 .