Update build files.
[awesomized/libmemcached] / docs / man / memcached_result_length.3
1 .TH "MEMCACHED_RESULT_LENGTH" "3" "June 10, 2011" "0.47" "libmemcached"
2 .SH NAME
3 memcached_result_length \- Working with result sets
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 .sp
34 Work with memcached_result_st
35 .SH SYNOPSIS
36 .sp
37 #include <libmemcached/memcached_pool.h>
38 .INDENT 0.0
39 .TP
40 .B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
41 .UNINDENT
42 .INDENT 0.0
43 .TP
44 .B void memcached_result_free (memcached_result_st *result);
45 .UNINDENT
46 .INDENT 0.0
47 .TP
48 .B const char * memcached_result_key_value (memcached_result_st *result);
49 .UNINDENT
50 .INDENT 0.0
51 .TP
52 .B size_t memcached_result_key_length (const memcached_result_st *result);
53 .UNINDENT
54 .INDENT 0.0
55 .TP
56 .B const char *memcached_result_value (memcached_result_st *ptr);
57 .UNINDENT
58 .INDENT 0.0
59 .TP
60 .B size_t memcached_result_length (const memcached_result_st *ptr);
61 .UNINDENT
62 .INDENT 0.0
63 .TP
64 .B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
65 .UNINDENT
66 .INDENT 0.0
67 .TP
68 .B uint64_t memcached_result_cas (const memcached_result_st *result);
69 .UNINDENT
70 .INDENT 0.0
71 .TP
72 .B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
73 .UNINDENT
74 .INDENT 0.0
75 .TP
76 .B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
77 .UNINDENT
78 .INDENT 0.0
79 .TP
80 .B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
81 .UNINDENT
82 .sp
83 Compile and link with \-lmemcachedutil \-lmemcached
84 .SH DESCRIPTION
85 .sp
86 libmemcached(3) can optionally return a memcached_result_st which acts as a
87 result object. The result objects have added benefits over the character
88 pointer returns, in that they are forward compatible with new return items
89 that future memcached servers may implement (the best current example of
90 this is the CAS return item). The structures can also be reused, which will
91 save on calls to malloc(3). It is suggested that you use result objects over
92 char * return functions.
93 .sp
94 The structure of memcached_result_st has been encapsulated, you should not
95 write code to directly access members of the structure.
96 .sp
97 memcached_result_create() will either allocate memory for a
98 memcached_result_st or will initialize a structure passed to it.
99 .sp
100 memcached_result_free() will deallocate any memory attached to the
101 structure. If the structure was also allocated, it will deallocate it.
102 .sp
103 memcached_result_key_value() returns the key value associated with the
104 current result object.
105 .sp
106 memcached_result_key_length() returns the key length associated with the
107 current result object.
108 .sp
109 memcached_result_value() returns the result value associated with the
110 current result object.
111 .sp
112 memcached_result_length() returns the result length associated with the
113 current result object.
114 .sp
115 memcached_result_flags() returns the flags associated with the
116 current result object.
117 .sp
118 memcached_result_cas() returns the cas associated with the
119 current result object. This value will only be available if the server
120 tests it.
121 .sp
122 memcached_result_set_value() takes a byte array and a size and sets
123 the result to this value. This function is used for trigger responses.
124 .sp
125 void memcached_result_set_flags() takes a result structure and stores
126 a new value for the flags field.
127 .sp
128 void memcached_result_set_expiration(A) takes a result structure and stores
129 a new value for the expiration field (this is only used by read through
130 triggers).
131 .sp
132 You may wish to avoid using memcached_result_create(3) with a
133 stack based allocation. The most common issues related to ABI safety involve
134 heap allocated structures.
135 .SH RETURN
136 .sp
137 Varies, see particular functions. All structures must have
138 memcached_result_free() called on them for cleanup purposes. Failure to
139 do this will result in leaked memory.
140 .SH HOME
141 .sp
142 To find out more information please check:
143 \fI\%http://libmemcached.org/\fP
144 .SH SEE ALSO
145 .sp
146 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
147 .SH AUTHOR
148 Brian Aker
149 .SH COPYRIGHT
150 2011, Brian Aker DataDifferential, http://datadifferential.com/
151 .\" Generated by docutils manpage writer.
152 .\"
153 .