Berkeley DB Reference Version 5.3.33

DB_SEQUENCE->open()

#include <db.h>

int
DB_SEQUENCE->open(DB_SEQUENCE *seq, DB_TXN *txnid, DBT *key, 
                  u_int32_t flags); 

The DB_SEQUENCE->open() method opens the sequence represented by the key. The key must be compatible with the underlying database specified in the corresponding call to db_sequence_create.

The DB_SEQUENCE->open() method returns a non-zero error value on failure and 0 on success.

Parameters

key

The key specifies which record in the database stores the persistent sequence data.

flags

The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:

txnid

If the operation is part of an application-specified transaction, the txnid parameter is a transaction handle returned from DB_ENV->txn_begin(); if the operation is part of a Berkeley DB Concurrent Data Store group, the txnid parameter is a handle returned from DB_ENV->cdsgroup_begin(); otherwise NULL. If no transaction handle is specified, but the operation occurs in a transactional database, the operation will be implicitly transaction protected. Transactionally protected operations on a DB_SEQUENCE handle require the DB_SEQUENCE handle itself be transactionally protected during its open if the open creates the sequence.

Class

DB_SEQUENCE

See Also

Sequences and Related Methods