storage
This option sets the storage type of the databases opened under this TFS handle. Supported values are:
Value | Description |
---|---|
ondisk
|
Use the disk-based engine |
inmemory_volatile
|
Use the in-memory engine. When the first client opens a database with the storage configuration option set to inmemory_volatile, the newly created database is considered to be "throw away." Database contents will only be saved by programmatically requesting the databases to be persisted. When the last client closes the database any changes since the last database persist request will be discarded. If no calls were made to persist the database, then the entire database is discarded. The RaimaDB Transaction File Server (TFS) maintains an open count to determine when a database is first opened and when it is no longer in use by any clients. |
inmemory_load
|
Use the in-memory engine. When the first client opens a database with the storage configuration option set to inmemory_load, the RaimaDB TFS will look for a pack file. If they are found the in-memory database will be loaded with the current contents of the on-disk files. When the last client closes the database any updates will not be automatically be written to the on-disk files. Changes can be saved by programmatically requesting the databases to be persisted. |
inmemory_keep
|
Use the in-memory engine. The inmemory_keep option is similar to the inmemory_volatile option with the exception that the database will ONLY be discarded when the TFS handling this database is terminated. |
inmemory_persist
|
Use the in-memory engine. When the first client opens a database with the storage configuration option set to inmemory_persist, the TFS will look for a pack file. If they are found the in-memory database will be loaded with the current contents of the on-disk files. When the last client closes the database any rows that have been modified will be written to the on-disk files. At any time, changes can be persisted programmatically. In this case only changes made since the last time the database was persisted will need to be written to disk. |
- Default Value
- If the
storage
option is not defined, the default value ofONDISK
is used.
- Example
-
storage=ONDISK
- Database Configuration Options
This option key is associated with the RDM_DB handle (or RDM_CPP::Db for C++) and can be set using one of the following functions:
- SQLSetConnectAttr()
- rdm_dbSetOption()
- rdm_dbSetOptions()
- RDM_CPP::Db::SetOption()
- RDM_CPP::Db::SetOptions()