Views are now rollbacked if an error occurs, and unfinished views and
columns are deleted when an OBIDMS is opened.
This commit is contained in:
@ -538,6 +538,43 @@ int obi_select_lines(Obiview_p view, index_t* line_nbs);
|
||||
int obi_save_and_close_view(Obiview_p view);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Goes through all the view files of a DMS and deletes views that have
|
||||
* not been flagged as finished (file extension renamed from '.obiview_unfinished'
|
||||
* to '.obiview' and finished boolean set to true in the file, done by finish_view()).
|
||||
*
|
||||
* @param dms A pointer on an OBIDMS.
|
||||
*
|
||||
* @returns A value indicating the success of the operation.
|
||||
* @retval 0 if the operation was successfully completed.
|
||||
* @retval -1 if an error occurred.
|
||||
*
|
||||
* @since October 2017
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
int obi_clean_unfinished_views(OBIDMS_p dms);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Frees and deletes an opened, writable view and the columns it created.
|
||||
*
|
||||
* The view and column files are deleted and the structures are freed.
|
||||
*
|
||||
* @warning The view pointer becomes invalid, as well as the pointers on
|
||||
* the columns created by the view.
|
||||
*
|
||||
* @param view A pointer on the writable view to rollback.
|
||||
*
|
||||
* @returns A value indicating the success of the operation.
|
||||
* @retval 0 if the operation was successfully completed.
|
||||
* @retval -1 if an error occurred.
|
||||
*
|
||||
* @since October 2017
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
int obi_rollback_view(Obiview_p view);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Creates an OBI_INT column with the line count of the view it belongs to, and sets all lines to 1.
|
||||
*
|
||||
|
Reference in New Issue
Block a user