Establishes a connection to an edge database instance.
For an overview, see the Edge Client page.
MCO_RET mco_edge_connect(const char *db_name, mco_edge_h *con);
db_name
mco_edge_open() call.con
mco_edge_h handle that will receive the connection reference. This handle is thread-local
and must not be shared between threads.Establishes a connection to an edge database instance previously created by mco_edge_open(), analogous to mco_db_connect()
in the core runtime.
Each thread that interacts with an edge database must obtain its own connection handle via mco_edge_connect(). Connection handles (mco_edge_h)
are not thread-safe and must not be shared across threads.
The edge client uses a lightweight connection model optimized for resource-constrained environments. Once connected, the application can perform transactions, insert data, and synchronize with the server using the returned handle.
Related types:
MCO_Ef[3] - User-space object handle, analogous to MCO_Hf in the core runtime.mco_edge_h - Database connection handle, analogous to mco_db_h in the core runtime.MCO_S_OK
MCO_E_ILLEGAL_PARAM
NULL db_name or con).MCO_E_SESLIMIT
mco_edge_params_t::max_connections).MCO_E_NOINSTANCE
db_name exists.