Create an instance of McoSqlOpenParameters and initialize its properties from the arguments passed.
For an overview see page McoSqlOpenParameters
Prototype
McoSqlOpenParameters(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 = DEFAULT_OPEN_FLAGS, char const* savedImage = NULL);Arguments
nameThe database name.dictionaryA handle to the dictionary that was created by the mcocomp schema processor. Normally, this handle is passed in by callingdbname_get_dictionary().sizeThe total amount of database memory in bytes.pageSizeThe size of database pages to be managed by the page manager.mapAddressAddress for a shared memory database.maxTransSizeMaximum transaction size; when 0, the default transaction size is used.A bit mask set with values from the enum OpenFlags defined in mcosql.h.savedImagePath and filename of the database image (snapshot) file to load from if specified.Description
This constructor calls
setDefaultValues()and sets the indicated properties from the corresponding arguments.Return Codes
In case of error, a runtime exception will be thrown with the appropriate error message.Examples
{ MCO_RET rc; mco_device_t dev[4]; McoSqlEngine engine; McoSqlOpenParameters params(dbName, 0, DATABASE_SIZE); ... engine.open( params ); }{ int flags = McoSqlOpenParameters::DEFAULT_OPEN_FLAGS; flags &= ~(McoSqlOpenParameters::START_MCO_RUNTIME); ... engine.open( McoSqlOpenParameters(dbName2, ph2commitdb_get_dictionary(), DATABASE_SIZE, MEMORY_PAGE_SIZE, (void*)0x20000000, 0, flags) ); }