|
|
DB->set_lorder |
#include <db.h>int DB->set_lorder(DB *db, int lorder);
int DB->get_lorder(DB *db, int *lorderp);
Set the byte order for integers in the stored database metadata. The host byte order of the machine where the Berkeley DB library was compiled will be used if no byte order is set.
The access methods provide no guarantees about the byte ordering of the application data stored in the database, and applications are responsible for maintaining any necessary ordering.
The DB->set_lorder method configures a database, not only operations performed using the specified DB handle.
The DB->set_lorder method may not be called after the DB->open method is called. If the database already exists when DB->open is called, the information specified to DB->set_lorder will be ignored.
If creating additional databases in a single physical file, information specified to DB->set_lorder will be ignored and the byte order of the existing databases will be used.The DB->set_lorder method returns a non-zero error value on failure and 0 on success.
The DB->set_lorder method may fail and return one of the following non-zero errors:
The DB->get_lorder method returns the database byte order; a byte order of 4,321 indicates a big endian order, and a byte order of 1,234 indicates a little endian order.
The DB->get_lorder method may be called at any time during the life of the application.
The DB->get_lorder method returns a non-zero error value on failure and 0 on success.
Copyright (c) 1996-2005 Sleepycat Software, Inc. - All rights reserved.