Table of Contents

IBPP::DBKey

The IBPP::DBKey class is used to hold a DBKEY, which is an opaque data type returned by the Firebird server when asked for the RDB$DB_KEY pseudo column. It is not an interface class, with automatic smart pointer management like for instance the Database class. It is a plain classical C++ class.

Definition

See the file ibpp.h for an up-to-date definition.

Methods

void Clear()

Clears a DBKey object to its defaults state like after a default construction.

int Size()

Returns the size (in bytes) of DBKey. This size is the real binary size of the DBKey, and not the string length of its eventual text representation. Typically DBKeys sizes are a multiple of 8 bytes depending on the number of tables they refer to.

void SetKey(const void* key, int size)

Allows to preset a DBKey from a known binary DBKey.

void GetKey(void* key, int size)

Allows to get the binary representation of the DBKey.

const char* AsString()

Returns a conventional text representation of the DBKey, similar to what the isql utility would print.

Constructors

DBKey()

Construct an empty DBKey, the same as when calling Clear() upon an existing one.

DBKey(const DBKey&)

Ordinary copy constructor. To make the DBKey a good citizen of your code.

Operators

DBKey& operator=(const DBKey&)

To assign a DBKey from another one.