Open the SQL engine with a list of parameters.
Prototype
void open(char const* name, mco_dictionary_h dictionary, size_t size, size_t pageSize = 128, void* mapAddress = MCO_DATABASE_DEFAULT_MAP_ADDRESS, size_t maxTransSize = 0, int flags = McoSqlOpenParameters::DEFAULT_OPEN_FLAGS, char const* databaseFile = NULL, size_t maxClasses = 100, size_t maxIndexes = 100, size_t maxDictionarySize = 16*1024);Arguments
nameThe database name.dictionaryA handle to the dictionary that was created by the eXtremeDB schema compilermcocomp. Normally, this handle is passed in by dbname_get_dictionary().sizeThe eXtremeDB database size (in bytes).pageSizeThe eXtremeDB in-memory page size (in bytes).mapAddressThe eXtremeDB map address (for a shared memory database).maxTransSizeThe maximum number of objects per transaction.flagsOptional open flags (see theOpenFlagsenum in McoSqlOpenParameters).databaseFileA database file to be loaded.maxClassesThe maximum number of classes.maxIndexesThe maximum number of indexes.maxDictionarySizeThe maximum size of the total dictionary.Description
This method opens an eXtremeDB database, an eXtremeDB SQL mapper and the McoSqlEngine instance with the list of parameters specified.
Returns
This method throws a RuntimeException in the case of an error.
Example
const char * dbname = "SimpleDb"; int main(int argc, char* argv[]) { MCO_RET rc; McoSqlEngine engine; ... engine.open( dbname, SimpleDb_get_dictionary(), DATABASE_SIZE, MEMORY_PAGE_SIZE); ... }