mco_db_page_size

Returns the database page size.

Prototype

    MCO_RET mco_db_page_size(  /*IN*/ mco_db_h h, /*OUT*/ uint2 * page_size);

Arguments

db
The database handle that was established by mco_db_connect().
page_size
The address of a uint2 variable to receive the page size.

Description

This function returns into page_size the page size for the database referenced by handle db.

Return Codes

MCO_S_OK
The page size was returned successfully.
MCO_E_INVALID_HANDLE
Database handle not opened.

Example


    Application snippet:

    const char * dbname = "SimpleDb";

    int main(int argc, char* argv[])
    {
        mco_db_h db;
        MCO_RET rc;
        mco_device_t dev;
        mco_db_params_t db_params;
        uint2 page_size;
        ...

        if ((rc = mco_runtime_start()) != MCO_S_OK)
            exit(-1);

        rc = mco_db_open_dev(dbname, simple_get_dictionary(), &dev, 1, &db_params);

        if (MCO_S_OK != rc)
        {
            rc = mco_db_connect(dbname, &db);
            ...
            rc = mco_db_page_size(db, &page_size);
        }
        ...
    }

Files

Header file:
mco.h
Source file:
mcodb.c
Library:
libmcolib.a