Debian Codegraph @

docs/api_reference/C/envset_data_len.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DB_ENV-&gt;set_data_len()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10 <link rel="up" href="env.html" title="Chapter 5.  The DB_ENV Handle" />
11 <link rel="prev" href="envset_data_dir.html" title="DB_ENV-&gt;set_data_dir()" />
12 <link rel="next" href="envset_create_dir.html" title="DB_ENV-&gt;set_create_dir()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DB_ENV-&gt;set_data_len()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_data_dir.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DB_ENV Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_create_dir.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="envset_data_len"></a>DB_ENV-&gt;set_data_len()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;set_data_len(DB_ENV *dbenv, u_int32_t bytes); </pre>
45 <p>
46 Limits the amount of data displayed when
47 <a class="xref" href="lockstat_print.html" title="DB_ENV-&gt;lock_stat_print()">DB_ENV-&gt;lock_stat_print()</a>
48 is called with the <code class="literal">DB_STAT_ALL</code> or
49 <code class="literal">DB_STAT_LOCK_OBJECTS</code> flag.
50 </p>
51 <p>
52 This method is explicitly called in the
53 <a class="xref" href="db_printlog.html" title="db_printlog">db_printlog</a>
54 and
55 <a class="xref" href="db_dump.html" title="db_dump">db_dump</a> utilities when using the
56 <span class="bold"><strong>-D</strong></span> command line option. When
57 used in this manner it will set the maximum number of bytes to
58 display for each key/data item. These utilities run in their own
59 environment context.
60 </p>
61 <p>
62 If you want to call this method from the primary application and
63 have it set the maximum number of bytes to display for each
64 key/data item, then you must bring the db_dump/db_printlog code
65 into the primary application and ensure that the same environment
66 handle is used throughout.
67 </p>
68 <p>
69 This limit may also be configured
70 using the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file. In this case, the limit
71 will equally affect your application code, as well as the command
72 line utilities noted above without modification to their code. The
73 syntax of the entry in that file is a single line with the string
74 "set_data_len", one or more whitespace characters, and the limit
75 in bytes that you want to set.
76 </p>
77 <p>
78 The <code class="methodname">DB_ENV-&gt;set_data_len()</code> method
79 configures operations performed using the specified
80 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a> handle, not all operations
81 performed on the underlying database environment.
82 </p>
83 <p>
84 The <code class="methodname">DB_ENV-&gt;set_data_len()</code> method may be
85 called at any time during the life of the application.
86 </p>
87 <p>
88 The <code class="methodname">DB_ENV-&gt;set_data_len()</code> <span>
89 <span>
90 method returns a non-zero error value on failure and 0 on success.
91 </span>
92
93 </span>
94 </p>
95 <div class="sect2" lang="en" xml:lang="en">
96 <div class="titlepage">
97 <div>
98 <div>
99 <h3 class="title"><a id="idp51883568"></a>Parameters</h3>
100 </div>
101 </div>
102 </div>
103 <div class="sect3" lang="en" xml:lang="en">
104 <div class="titlepage">
105 <div>
106 <div>
107 <h4 class="title"><a id="idp51883760"></a>bytes</h4>
108 </div>
109 </div>
110 </div>
111 <p>
112 The <span class="bold"><strong>bytes</strong></span> parameter
113 identifies the maximum number of bytes to display when
114 dumping the database or printing the log.
115 The value specified here must be greater than
116 <code class="literal">0</code>.
117 </p>
118 </div>
119 </div>
120 <div class="sect2" lang="en" xml:lang="en">
121 <div class="titlepage">
122 <div>
123 <div>
124 <h3 class="title"><a id="idp51865040"></a>Class</h3>
125 </div>
126 </div>
127 </div>
128 <p>
129 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>
130 </p>
131 </div>
132 <div class="sect2" lang="en" xml:lang="en">
133 <div class="titlepage">
134 <div>
135 <div>
136 <h3 class="title"><a id="idp51865520"></a>See Also</h3>
137 </div>
138 </div>
139 </div>
140 <p>
141 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>
142 </p>
143 </div>
144 </div>
145 <div class="navfooter">
146 <hr />
147 <table width="100%" summary="Navigation footer">
148 <tr>
149 <td width="40%" align="left"><a accesskey="p" href="envset_data_dir.html">Prev</a> </td>
150 <td width="20%" align="center">
151 <a accesskey="u" href="env.html">Up</a>
152 </td>
153 <td width="40%" align="right"> <a accesskey="n" href="envset_create_dir.html">Next</a></td>
154 </tr>
155 <tr>
156 <td width="40%" align="left" valign="top">DB_ENV-&gt;set_data_dir() </td>
157 <td width="20%" align="center">
158 <a accesskey="h" href="index.html">Home</a>
159 </td>
160 <td width="40%" align="right" valign="top"> DB_ENV-&gt;set_create_dir()</td>
161 </tr>
162 </table>
163 </div>
164 </body>
165 </html>