db_sequence_create API Ref

#include <db.h>

typedef struct __db_sequence DB_SEQUENCE;

int db_sequence_create(DB_SEQUENCE **seq, DB *db, u_int32_t flags);


Description: db_sequence_create

The DB_SEQUENCE handle is the handle used to manipulate a sequence object. A sequence object is stored in a record in a database.

DB_SEQUENCE handles are free-threaded if the DB_THREAD flag is specified to the DB_SEQUENCE->open method when the sequence is opened. Once the DB_SEQUENCE->close or DB_SEQUENCE->remove methods are called, the handle may not be accessed again, regardless of the method's return.

Each handle opened on a sequence may maintain a separate cache of values which are returned to the application using the DB_SEQUENCE->get method either singly or in groups depending on its delta parameter.

The DB_SEQUENCE method creates a DB_SEQUENCE object that serves as the handle for a sequence. Calling the DB_SEQUENCE->close or DB_SEQUENCE->remove methods will discard the handle.

The db_sequence_create method returns a non-zero error value on failure and 0 on success.

Parameters
seq db flags

Errors

The db_sequence_create method may fail and return one of the following non-zero errors:


EINVAL


Class DB_SEQUENCE
See Also Sequences and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.