Berkeley DB: Db::get_type
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++

### Db::get_type |

`

###

    #include <db_cxx.h>

    int
    Db::get_type(DBTYPE *type);

### Description: Db::get_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 has been called.

The Db::get_type method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

type
  The type parameter references memory into which the type of the underlying access method is copied.

### Errors

The Db::get_type method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

EINVAL
  If the method was called before Db::open was called; or if an invalid flag value or parameter was specified.

### Class

Db

### See Also

Databases and Related Methods`

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.