Library Version 12.1.6.1

DbHeapRecordId
Prev | Chapter 2. The Db Handle | Next

## DbHeapRecordId

    #include <db_cxx.h>

    class _exported DbHeapRecordId : private DB_HEAP_RID
    {
    public:
        db_pgno_t get_pgno() const      { return pgno; }
        void set_pgno(db_pgno_t value)  { pgno = value; }

        db_indx_t get_indx() const      { return indx; }
        void set_indx(db_indx_t value)  { indx = value; }

        DB_HEAP_RID *get_DB_HEAP_RID()  { return (DB_HEAP_RID *)this; }
        const DB_HEAP_RID *get_const_DB_HEAP_RID() const
                        { return (const DB_HEAP_RID *)this; }

        static DbHeapRecordId* get_DbHeapRecordId(DB_HEAP_RID *rid)
                        { return (DbHeapRecordId *)rid; }
        static const DbHeapRecordId* get_const_DbHeapRecordId(DB_HEAP_RID *rid)
                        { return (const DbHeapRecordId *)rid; }

        DbHeapRecordId(db_pgno_t pgno, db_indx_t indx);
        DbHeapRecordId();
        ~DbHeapRecordId();
        DbHeapRecordId(const DbHeapRecordId &);
        DbHeapRecordId &operator = (const DbHeapRecordId &);
    };

Content used for the key in a Heap database record. Berkeley DB instantiates an object of this class for you when you create a record in a Heap database. You should never instantiate an object of this class or modify the contents of this class yourself; Berkeley DB must create and manage it for you.

This object is returned in the key Dbt parameter of the method that you use to add a record to the Heap database.

### Class Methods

#### get_pgno()

Returns the database page number where the record is stored.

#### get_indx()

Returns the index in the offset table where the record can be found.

#### get_DB_HEAP_RID()

Returns a pointer to the underlying C-language structure used to store the database page number and offset table index information.

#### set_pgno()

For internal use only. Changing the offset index has unpredictable results.

#### set_indx()

For internal use only. Changing the offset index has unpredictable results.

### See Also

Database and Related Methods,

Prev | Up | Next
Db::verify() | Home | Chapter 3. The Dbc Handle