mco_get_max_connections

Retrieve the maximum number of concurrent connections allowed for the database.

Prototype

    int mco_get_max_connections(
        /*IN*/ mco_db_h con
    );

Arguments

con
Database connection handle.

Description

This function returns the maximum number of concurrent connections that the database was configured to support at creation time. This value is fixed for the lifetime of the database and is determined by the runtime configuration.

This information can be used for diagnostic purposes, resource planning, or dynamic connection pooling logic.

Return Value

int
The maximum number of concurrent connections allowed for the database instance.

Example

    mco_db_h db;
    MCO_RET rc;

    rc = mco_db_connect("mydb", &db);
    if (rc == MCO_S_OK) {
        int max_conns = mco_get_max_connections(db);
        printf("Database supports up to %d concurrent connections\n", max_conns);
    }

Files

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