Opens an edge database instance within a pre-allocated memory region.
For an overview, see the Edge Client page.
MCO_RET mco_edge_open(const char* db_name,
mco_dictionary_h dict,
void *memptr,
mco_size_t memsize,
mco_edge_params_t *params);
db_name
dict
mcocomp schema compiler for this edge application.memptr
memsize
memptr, in bytes.params
mco_edge_params_t structure containing initialization parameters. May be NULL to use default values. For a
detailed description of the structure fields, see Edge Parameters.Opens an edge database instance within a pre-allocated memory region. The edge database header, internal structures, and RX/TX communication
buffers are allocated from the specified memory region (memptr). The remaining space is used as a ring buffer for storing transaction
data pending synchronization with the server.
The ring buffer size must be at least twice the size of the largest object in the schema to ensure proper operation. Since all classes in edge databases
are fixed-size (a requirement of the edge client), this constraint is validated internally by mco_edge_open().
It is recommended to call mco_edge_start() explicitly before opening any edge databases to ensure proper runtime initialization,
especially in multithreaded applications.
MCO_S_OK
MCO_E_ILLEGAL_PARAM
NULL db_name, insufficient memsize,
or invalid buffer sizes in params).MCO_E_INSTANCE_DUPLICATE
db_name already exists.MCO_E_INSTANCES_LIMIT