#include <db.h> int DB->get_type(DB *db, DBTYPE *type);
The DB->get_type()
method returns the type of the underlying access
method (and file format). The type value is one of DB_BTREE, DB_HASH,
DB_RECNO, or DB_QUEUE. This value may be used to determine the type
of the database after a return from
DB->open()
with the type parameter set to DB_UNKNOWN.
The DB->get_type()
method may not be called before the
DB->open()
method is called.
The DB->get_type()
method returns a non-zero error value on failure and 0 on success.
The DB->get_type()
method may fail and return one of the following non-zero errors:
If the method was called before DB->open() was called; or if an invalid flag value or parameter was specified.