mkFlags: Create Valid Flags For DB Calls

Description Usage Arguments Details Value Author(s) References Examples

Description

Allows for unquoted DB API-like constant names to be bitwise OR'd together for passing into low-level database calls.

Usage

1

Arguments

...

quoted or unquoted comma separated names of DB constants

Details

The Berkeley DB (tm) database makes use of predefined constants in the C code to pass as flags to many of the function calls.

These flags may be combined, using bitwise OR logic, and the resultant value can than be used as a valid flag argument.

This function takes unquoted arguments that match the underlying API flag/constant names.

If a name is passed that is not part of the available API, a warning is returned and the argument is effectively ignored. If this value should be present, and simply isn't please submit a bug report to the RBerkeley maintainer.

All bitwise operations are within the C code to allow for maximum consistency with the API, as well as allowing as close to the API semantics as possible.

Value

An integer suitable for use as a flags argument in the lower-level API calls.

Author(s)

Jeffrey A. Ryan

References

Oracle BerkeleyDB https://www.oracle.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mkFlags(DB_CREATE)
mkFlags(DB_CREATE, DB_EXCL)
mkFlags(DB_CREATE, DB_EXCL, DB_NOMMAP)
mkFlags(DB_RDONLY)

# DB_NOTHERE is not valid, throws warning
## Not run: 
mkFlags(DB_NOMMAP,DB_CONSTANT_NOT_DEFINED)

## End(Not run)

RBerkeley documentation built on Jan. 15, 2017, 3:44 p.m.