O'Reilly logo

Berkeley DB by Sleepycat™ Software, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DB→set_flags

						#include <db.h>
						int
						DB→set_flags(DB *db, u_int32_t flags);
					

Description

Calling DB→set_flags is additive; there is no way to clear flags.

The flags value must be set to 0 or by bitwise inclusively OR’ing together one or more of the following values.

Btree

The following flags may be specified for the Btree access method:

  • DB_DUP Permit duplicate data items in the tree; that is, insertion when the key of the key/data pair being inserted already exists in the tree will be successful. The ordering of duplicates in the tree is determined by the order of insertion, unless the ordering is otherwise specified by use of a cursor operation. It is an error to specify both DB_DUP and DB_RECNUM.

  • DB_DUPSORT Permit duplicate data items in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required