| 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->set_lorder()</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="db.html" title="Chapter 2. The DB Handle" /> |
| 11 | <link rel="prev" href="dbset_lk_exclusive.html" title="DB->set_lk_exclusive()" /> |
| 12 | <link rel="next" href="dbset_msgcall.html" title="DB->set_msgcall()" /> |
| 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->set_lorder()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="dbset_lk_exclusive.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 2. |
| 26 | The DB Handle |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="dbset_msgcall.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="dbset_lorder"></a>DB->set_lorder()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | DB->set_lorder(DB *db, int lorder); </pre> |
| 45 | <p> |
| 46 | Set the byte order for integers in the stored database metadata. The |
| 47 | host byte order of the machine where the Berkeley DB library was |
| 48 | compiled will be used if no byte order is set. |
| 49 | </p> |
| 50 | <p> |
| 51 | <span class="bold"><strong>The access methods provide no guarantees about |
| 52 | the byte ordering of the application data stored in the database, and |
| 53 | applications are responsible for maintaining any necessary |
| 54 | ordering.</strong></span> |
| 55 | </p> |
| 56 | <p> |
| 57 | The <code class="methodname">DB->set_lorder()</code> method configures a database, not only |
| 58 | operations performed using the specified <a class="link" href="db.html" title="Chapter 2. The DB Handle">DB</a> |
| 59 | handle. |
| 60 | </p> |
| 61 | <p> |
| 62 | The <code class="methodname">DB->set_lorder()</code> method may not be called after the |
| 63 | <a class="xref" href="dbopen.html" title="DB->open()">DB->open()</a> method is called. If |
| 64 | the database already exists when <a class="xref" href="dbopen.html" title="DB->open()">DB->open()</a> |
| 65 | is called, the information specified to <code class="methodname">DB->set_lorder()</code> will be ignored. |
| 66 | </p> |
| 67 | <p> |
| 68 | |
| 69 | If creating additional databases in a single physical file, |
| 70 | information specified to |
| 71 | <code class="methodname">DB->set_lorder()</code> will be ignored and the |
| 72 | byte order of the existing databases will be used. |
| 73 | |
| 74 | </p> |
| 75 | <p> |
| 76 | The <code class="methodname">DB->set_lorder()</code> <span> |
| 77 | <span> |
| 78 | method returns a non-zero error value on failure and 0 on success. |
| 79 | </span> |
| 80 | |
| 81 | </span> |
| 82 | </p> |
| 83 | <div class="sect2" lang="en" xml:lang="en"> |
| 84 | <div class="titlepage"> |
| 85 | <div> |
| 86 | <div> |
| 87 | <h3 class="title"><a id="idp50431592"></a>Parameters</h3> |
| 88 | </div> |
| 89 | </div> |
| 90 | </div> |
| 91 | <div class="sect3" lang="en" xml:lang="en"> |
| 92 | <div class="titlepage"> |
| 93 | <div> |
| 94 | <div> |
| 95 | <h4 class="title"><a id="idp50408136"></a>lorder</h4> |
| 96 | </div> |
| 97 | </div> |
| 98 | </div> |
| 99 | <p> |
| 100 | The <span class="bold"><strong>lorder</strong></span> parameter should represent |
| 101 | the byte order as an integer; for example, big endian order is the |
| 102 | number 4,321, and little endian order is the number 1,234. |
| 103 | </p> |
| 104 | </div> |
| 105 | </div> |
| 106 | <div class="sect2" lang="en" xml:lang="en"> |
| 107 | <div class="titlepage"> |
| 108 | <div> |
| 109 | <div> |
| 110 | <h3 class="title"><a id="idp50412936"></a>Errors</h3> |
| 111 | </div> |
| 112 | </div> |
| 113 | </div> |
| 114 | <p> |
| 115 | The <code class="methodname">DB->set_lorder()</code> <span> |
| 116 | <span> |
| 117 | method may fail and return one of the following non-zero errors: |
| 118 | </span> |
| 119 | |
| 120 | </span> |
| 121 | </p> |
| 122 | <div class="sect3" lang="en" xml:lang="en"> |
| 123 | <div class="titlepage"> |
| 124 | <div> |
| 125 | <div> |
| 126 | <h4 class="title"><a id="idp50455256"></a>EINVAL</h4> |
| 127 | </div> |
| 128 | </div> |
| 129 | </div> |
| 130 | <p> |
| 131 | If the method was called after <a class="xref" href="dbopen.html" title="DB->open()">DB->open()</a> |
| 132 | was called; or if an invalid flag value or parameter was specified. |
| 133 | </p> |
| 134 | </div> |
| 135 | </div> |
| 136 | <div class="sect2" lang="en" xml:lang="en"> |
| 137 | <div class="titlepage"> |
| 138 | <div> |
| 139 | <div> |
| 140 | <h3 class="title"><a id="idp50454176"></a>Class</h3> |
| 141 | </div> |
| 142 | </div> |
| 143 | </div> |
| 144 | <p> |
| 145 | <a class="link" href="db.html" title="Chapter 2. The DB Handle">DB</a> |
| 146 | </p> |
| 147 | </div> |
| 148 | <div class="sect2" lang="en" xml:lang="en"> |
| 149 | <div class="titlepage"> |
| 150 | <div> |
| 151 | <div> |
| 152 | <h3 class="title"><a id="idp50457280"></a>See Also</h3> |
| 153 | </div> |
| 154 | </div> |
| 155 | </div> |
| 156 | <p> |
| 157 | <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> |
| 158 | </p> |
| 159 | </div> |
| 160 | </div> |
| 161 | <div class="navfooter"> |
| 162 | <hr /> |
| 163 | <table width="100%" summary="Navigation footer"> |
| 164 | <tr> |
| 165 | <td width="40%" align="left"><a accesskey="p" href="dbset_lk_exclusive.html">Prev</a> </td> |
| 166 | <td width="20%" align="center"> |
| 167 | <a accesskey="u" href="db.html">Up</a> |
| 168 | </td> |
| 169 | <td width="40%" align="right"> <a accesskey="n" href="dbset_msgcall.html">Next</a></td> |
| 170 | </tr> |
| 171 | <tr> |
| 172 | <td width="40%" align="left" valign="top">DB->set_lk_exclusive() </td> |
| 173 | <td width="20%" align="center"> |
| 174 | <a accesskey="h" href="index.html">Home</a> |
| 175 | </td> |
| 176 | <td width="40%" align="right" valign="top"> DB->set_msgcall()</td> |
| 177 | </tr> |
| 178 | </table> |
| 179 | </div> |
| 180 | </body> |
| 181 | </html> |