Functions | |
RDM_RETCODE | rdm_dbExport (RDM_DB db, const char *optString) |
Database export API. More... | |
RDM_RETCODE | rdm_dbVacuum (RDM_DB db, const char *optString) |
Database vacuum API. More... | |
RDM_RETCODE | rdm_dbCreateNewPackFile (RDM_DB db) |
Create a new pack file. More... | |
RDM_RETCODE | rdm_dbImport (RDM_DB db, const char *optString) |
Database import API. More... | |
RDM_RETCODE | rdm_dbRebuildKey (RDM_DB db, RDM_KEY_ID keyId, uint32_t reportFrequency, RDM_REBUILD_INDEX_REPORT_FCN *fcn) |
Rebuild keys for an index. More... | |
RDM_RETCODE | rdm_dbRebuildKeys (RDM_DB db, uint32_t numKeys, const RDM_KEY_ID *keyId, uint32_t reportFrequency, RDM_REBUILD_INDEX_REPORT_FCN *fcn) |
Rebuild keys for one or more indexes. More... | |
Utility API for a database. Unless otherwise stated functions here are located in RDM DB Engine Library. Linker option:
-lrdmrdm
RDM_RETCODE rdm_dbCreateNewPackFile | ( | RDM_DB | db | ) |
#include <rdmdbapi.h>
Create a new pack file.
This API forces the database to create a new pack file. All changes will now be written to the new pack. A new pack is typically created when the current pack reaches the max-pack-file-size threshold. This function forces a new pack independent of the size of the current pack.
This function is located in RDM DB Engine Library. Linker option:
-lrdmrdm
sOKAY | Normal, successful return. |
eDBNOTOPEN | Database not open. |
rdm-vacuum
[in] | db | A valid RDM database handle |
RDM_RETCODE rdm_dbExport | ( | RDM_DB | db, |
const char * | optString | ||
) |
#include <rdmdbapi.h>
Database export API.
This API exports data from the database to ASCII text files or an XML file that can then be moved to another computer, or used as input into other tools that read the formatted files (for example: rdm_dbImport()).
For CSV export the rdm_dbExport() API writes all data from each table to a separate file; it is the table name with file extension .txt
. If a table name, is specified, then only that table's rows are exported. The created files will consist of one text line per row occurrence with a separator characters separating the columns.
The CSV export has two ways of printing extended ASCII characters to the output files. The default is to write out the octal value. Since rdm_dbImport() cannot handle this method, the extended option can be used to print the extended ASCII character as the character. For example, ASCII 2 would be printed as "\002" without the extended and as a smiley face with the extended option.
For XML exports the rdm_dbExport() API writes all data from the database to an XML file. By exporting data into XML format, consumers of the data can be RDM (e.g. for database archiving), RDM Server, or other XML consumers, including other database products such as ADO.NET. The XML content created by the rdm_dbExport() API will allow reconstruction of sets (in the case of RDM as the consumer), or interpretation by any normal XML consumer.
This function is located in RDM Export Library. Linker option:
-lrdmexport
sOKAY | Normal, successful return. |
eDBNOTOPEN | Database not open. |
[in] | db | A valid RDM database handle |
[in] | optString | A semicolon delimited string that contains the utility options |
RDM_RETCODE rdm_dbImport | ( | RDM_DB | db, |
const char * | optString | ||
) |
#include <rdmdbapi.h>
Database import API.
This API imports data from text files to database tables. The import functionality is simple enough to allow great quantities of raw ASCII/XML data to be entered into an RDM database with very little specification. With more complex requirements, rdm_dbImport() can be instructed to perform mappings between the input data and table rows/columns.
For CSV imports all instructions to rdm_dbImport() are placed into a text file in the form of an import specification language (ISL). An ISL specification identifies the database and the files containing ASCII data to be imported. It also contains mappings between ASCII data fields and the RDM tables.
For XML imports the XML document must be in the format supported be the RDM engine. The RDM rdm_dbExport() API will create an XML document that is in the correct format for rdm_dbImport(). See the documentation on the XML format for full details.
This function is located in RDM Export Library. Linker option:
-lrdmexport
sOKAY | Normal, successful return. |
eDBNOTOPEN | Database not open. |
[in] | db | A valid RDM database handle |
[in] | optString | A semicolon delimited string that contains the utility options |
RDM_RETCODE rdm_dbRebuildKey | ( | RDM_DB | db, |
RDM_KEY_ID | keyId, | ||
uint32_t | reportFrequency, | ||
RDM_REBUILD_INDEX_REPORT_FCN * | fcn | ||
) |
#include <rdmdbapi.h>
Rebuild keys for an index.
This function allows an application to rebuild keys for the index specified by keyId.
If reportFrequency is non-zero and fcn is not NULL, rdm_dbRebuildKey() calls the report function pointed to by fcn every reportFrequency rows it has successfully processed.
sOKAY | Normal, successful return. |
eDBNOTOPEN | Database not open. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no rdm_dbStartUpdate() is active. |
eNOTLOCKED | Attempt to access a table for reading or update without proper locks. |
ePRECOMMITTED | A precommitted transaction must be committed or rolled back before further operations on this database are allowed. |
RDM_RETCODE rdm_dbRebuildKeys | ( | RDM_DB | db, |
uint32_t | numKeys, | ||
const RDM_KEY_ID * | keyId, | ||
uint32_t | reportFrequency, | ||
RDM_REBUILD_INDEX_REPORT_FCN * | fcn | ||
) |
#include <rdmdbapi.h>
Rebuild keys for one or more indexes.
This function allows an application to rebuild the indexes specified by keyId.
If reportFrequency is non-zero and fcn is not NULL, rdm_dbRebuildKeys() calls the report function pointed to by fcn every reportFrequency rows it has successfully processed.
sOKAY | Normal, successful return. |
eDBNOTOPEN | Database not open. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no rdm_dbStartUpdate() is active. |
eNOTLOCKED | Attempt to access a table for reading or update without proper locks. |
ePRECOMMITTED | A precommitted transaction must be committed or rolled back before further operations on this database are allowed. |
RDM_RETCODE rdm_dbVacuum | ( | RDM_DB | db, |
const char * | optString | ||
) |
#include <rdmdbapi.h>
Database vacuum API.
This API vacuums delete data from the disk-based database pack files.
This function is located in RDM DB Engine Library. Linker option:
-lrdmrdm
sOKAY | Normal, successful return. |
eDBNOTOPEN | Database not open. |
[in] | db | A valid RDM database handle |
[in] | optString | A semicolon delimited string that contains the utility options |