Database
Hosting databases for the C++ Replication API
An action can be pushed from the central point of control (<FC_PROD_REPLICATIOM_MGR>
) to any node in the Site and executed by that node.
Each DBEngine can host one or more databases. The FairCom replication APIs recognizes the FairCom DB SQL database.
Class
FCREPLDatabase
This class is below DBEngine in the hierarchy. It has a list of tables/files. In c-tree it can of be FairCom DB SQL.
Getters
Database path |
|
Inherited getters
Database identification | int GetID(); |
DBEngine identification NoteThis is linked to FCREPLDBEngine class. |
|
Database name |
|
Database dictionary file name |
|
Return if database is SQL |
|
Retrieve the database path |
|
Setters
Database name |
|
Database dictionary file name | void SetDictFileName(const char *dictFileName) { ((pRCESDatabase)this)->SetDictFileName(dictFileName); }; |
Inherited setters
Database identification |
|
DBEngine identification NoteIt is linked to |
|
Set name |
|
Set filename string |
|
Database SQL flag |
|
Link a list of files to a database.
Prototype
FCREPL_API int fcReplAddFilesToDatabase(pFCREPLConn replConn, int databaseId, int *fileList, int fileCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Database identification |
| File ID list |
| File count |
Return
Error code
Retrieve all the databases entity objects for the given DBEngine identification.
Prototype
FCREPL_API int fcReplGetDatabases(pFCREPLConn replConn, int dbEngineID, ppFCREPLDatabase *databaseList, int *databaseCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine identification |
| Database entity list |
| Number of database entities in the list |
Return
Error code
Retrieve the database entity object by its name.
Prototype
FCREPL_API int fcReplGetDatabase(pFCREPLConn replConn, int dbEngineID, const char *name, ppFCREPLDatabase database);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine identification |
| Database name |
| Database entity retrieved |
Return
Error code
Add a database entity to the database. If there already is a database with the given dbEngine/name, update the existing record.
Prototype
FCREPL_API int fcReplPersistDatabase(pFCREPLConn replConn, pFCREPLDatabase database);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Database entity to be persisted |
Return
Error code
Delete the database by its identification.
Prototype
FCREPL_API int fcReplRemoveDatabase(pFCREPLConn replConn, int databaseID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Database identification |
Return
Error code