Commit 4b86aa67 by Celine Mercier

New C functions to import a column and a view from a DMS to another DMS

parent a3e81930
......@@ -361,4 +361,46 @@ char* obi_dms_get_full_path(OBIDMS_p dms, const char* path_name);
DIR* opendir_in_dms(OBIDMS_p dms, const char* path_name);
/**
* @brief Imports a column, copying it from a DMS to another DMS, and returns the version of the column in the destination DMS.
*
* The eventual associated indexers are imported too. If an indexer with the same name already exists in the destination DMS,
* they are not merged, the imported indexer is renamed.
*
* @warning The eventual associated column is not imported and needs to be imported separately.
*
* @param dms_path_1 The path to the source DMS (without the '.obidms' extension).
* @param dms_path_2 The path to the destination DMS (without the '.obidms' extension). It is created if it doesn't already exist.
* @param column_name The name of the column to import.
* @param version_number The version of the column to import.
*
* @returns The new version of the column in the destination DMS.
* @retval -1 if an error occurred.
*
* @since August 2017
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
obiversion_t obi_import_column(const char* dms_path_1, const char* dms_path_2, const char* column_name, obiversion_t version_number);
/**
* @brief Imports a view, copying it and all its associated columns from a DMS to another DMS.
*
* All the columns and the eventual associated indexers are imported. If an indexer with the same name already exists in the destination DMS,
* they are not merged, the imported indexer is renamed.
*
* @param dms_path_1 The path to the source DMS (without the '.obidms' extension).
* @param dms_path_2 The path to the destination DMS (without the '.obidms' extension). It is created if it doesn't already exist.
* @param view_name_1 The name of the view to import.
* @param view_name_2 The name of the imported view in the destination DMS.
*
* @retval 0 on success.
* @retval -1 if an error occurred.
*
* @since August 2017
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
int obi_import_view(const char* dms_path_1, const char* dms_path_2, const char* view_name_1, const char* view_name_2);
#endif /* OBIDMS_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment